views:

39

answers:

1

Hi guys,

I'm working on a legacy project. The database is poorly designed. I want to change the DB layer now. The first think go through my mind is hibernate, but I hibernate need a primary key on my table. In fact some of my table does not have primary key. So I did a google search and I find iBatis, it's sounds very good with it. But I don't know whether iBatis enforce a primary key on my table?

Thanks.

+2  A: 

No. IBatis does not force you to have a primary key on your table. Its primary job and strength is to map data from resultsets to java objects. The SQL statements to retrieve the data from the database are written by hand (you), so you have almost no constraints or limitations here.

Sylar
Thanks for your help!
Yousui