From: Christof A. (JIRA) <no...@at...> - 2006-05-09 08:03:24
|
Generated link table contains non nullable ids ---------------------------------------------- Key: EJB-176 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-176 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.1.0.Beta8 Environment: Derby database. Hibernate 3.2.0cr1 (cr2 could not work at all it seems) Reporter: Christof Ameye Priority: Blocker I have an entity A containing two lists (@OneToMany) relations to two different entity types B3 and B23, but both of these entity types are derived from the same persistable entity type Bp1. So both entity types arrive in the same table for Bp1. When automatically generating the tables (the persistence.xml property 'hibernate.hbm2ddl.auto' is set to 'create-drop'). It seems it creates a link table containing 3 columns with 'A_ID', 'B3_ID' and 'B23_ID'. Persisting always fails: One entry in the table contains always an entry in column A_ID, but in the other columns there is always only one filled in (should). But any insert always fails, because there is always one of the columns null, but the table definition does not allow nulls; (it contains a link either to entity of type B3 or to entity of type B23). I suppose I hit a bug ? Hibernate 3.2CR1 with the latests annotations and entity manager. Using a Derby database. -- 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 |