Java Mailing List Archive

http://www.gg3721.com/

Home » Hibernate Issues List »

[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5399)
Unidirectional one-to-many relationship fails when creating referenced
entity object (testcase provided)

Anupam M (JIRA)

2010-07-21

Replies: Find Java Web Hosting

Author LoginPost Reply
Unidirectional one-to-many relationship fails when creating referenced entity object (testcase provided)
--------------------------------------------------------------------------------------------------------

          Key: HHH-5399
          URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5399
        Project: Hibernate Core
      Issue Type: Bug
      Components: entity-manager
  Affects Versions: 3.5.3
       Reporter: Jürgen Zimmermann
     Attachments: testcase.zip

The attached "Maven-ized" testcase works as follows:
* Create an H2 database with tables t_customer and t_order, and insert one customer with two orders.
* Compile and run the test class: both test methods fail.

1st method:
* lookup the customer and verify the 2 referenced orders
* create a new order for the customer
* EntityManager.merge(customer)

2nd method:
* lookup the customer and verify the 2 referenced orders
* create a new order for the customer
* EntityManager.persist(newOrder)


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

   

_______________________________________________
hibernate-issues mailing list
hibernate-issues@(protected)
https://lists.jboss.org/mailman/listinfo/hibernate-issues
©2008 gg3721.com - Jax Systems, LLC, U.S.A.