database « Collection « JPA Q&A





1. J2SE desktop applications - JPA database vs Collections?    stackoverflow.com

I come from a web development background and haven't done anything significant in Java in quite some time. I'm doing a small project, most of which involves some models with relationships and ...

2. Little Hibernate puzzle - database right, collection wrong    forum.hibernate.org

Most obvious thing to blame would be the hashCodes of the various classes. If they're using member fields instead of properties, then the default values may be being used, instead of the hydrated values (from the DB). hashCodes likes this are bad: Code: public int hashCode() { return 17 + (m_nIntValue * 37) + (m_sStringValue.hashCode() * 37); } This ...

3. how do we save a collection in the database    forum.hibernate.org

Can I use saveOrUpdate() to add a collection(Set) to the database? Can I use the saveOrUpdate() method on the session object for adding a record to the database. What I need actually is if the given record doesn't exist in the database I need to add it or if it already exists I need to modify it. Presently I am doing ...

4. Collection not being persisted to database ???    forum.hibernate.org

Beginner Joined: Fri Oct 06, 2006 7:11 am Posts: 32 Hi, I have the following relationship Certificate has one or more Packers Packer has one or more Manufacturers When I create a Certificate and save it, everything works fine. When I create a Certificate and try to add a Packer nothing is saved. The SQL seems to be generated ok but ...

5. Help: Persist collection in two databases    forum.hibernate.org

I have Lead class with Set collection. In Field I have name, lead_id properties. I have database1 and database2 and database1.field database2.field tables(the same columns and foreign keys). On database2.field I have I need: 1. insert, update, load Field into database1, database2 as: with name == name1 to database1 with name == name2 to database2 once field with name1, name2 inserts ...