开发者

Does iBatis enforce a primary key on my table?

开发者 https://www.devze.com 2022-12-23 08:18 出处:网络
I\'m working on a legacy project. The database is poorly designed. I want 开发者_StackOverflow社区to change the DB layer now. The first think go through my mind is hibernate, but I hibernate need a pr

I'm working on a legacy project. The database is poorly designed. I want 开发者_StackOverflow社区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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号