1. Get list by primary keys (plural) - Generic DAO forum.hibernate.org public |
2. Where to check foreign key existance: DAO object or Service? forum.hibernate.orgI have an UserDAO and an CountryDAO object. When I insert an User object into database, first I must check if the Country for that user exists in database (if nobody deleted it). If I check this in insertUser() method from UserDAO object, I must get a reference of CountryDAO object. This seems wrong to me, because I tight couple two ... |