aspose file tools*
The moose likes Object Relational Mapping and the fly likes Adding an element to a collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Adding an element to a collection" Watch "Adding an element to a collection" New topic
Author

Adding an element to a collection

Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4926
    
  10

Hi all,

I have the following 3 classes (only approproate code is shown):
- Vestiging

- VestigingOmschrijving

- VestigingEmail


When the following code is executed, i see in the console 1 insert statement and 2 update statements generated (and when i look into the database, the new VestigingOmschrijving is added to the appropriate table). so it works like a charm and does what i expect.


When I try to do the same for VestigingEmail, but no insert/update statements are generated and the new email address is not added to the database.


I have totally no clue about why the VestigingEmail is not added, but the VestigingOmschrijving is. Code seems similar to me, so totally lost on this.

Any help highly appreciated,
Kind regards,
Roel


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding an element to a collection
 
Similar Threads
Mysql auto generated PK used for another table and JPA
EJB3.0 example
Could not determine type for: java.util.Set
what us mean mappedBy="item" ?
Primary key / Forign Key