[hibernate-issues] [Hibernate-JIRA] Created: (HHH-5189) Same table is mapped twice but different primary keys. Giving error while secondPassCompileForeignKeys.
Sardar Romender Singh (JIRA)
noreply at atlassian.com
Mon May 3 23:48:30 EDT 2010
Same table is mapped twice but different primary keys. Giving error while secondPassCompileForeignKeys.
-------------------------------------------------------------------------------------------------------
Key: HHH-5189
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5189
Project: Hibernate Core
Issue Type: Bug
Environment: OS: Linux
DB : Oracle
Hibernate Version : 3.2.5 ga
Reporter: Sardar Romender Singh
Priority: Trivial
Two tables are mapped with different primary keys.
Example :
I have customer table which is mapped to Customer Entity whose primary keys are Customer id and status (which says authorized customer or un authorized customer).
I have one more entity mapped to same table CustomerLight which will load only some specific fields of the customer which contains the where clause which specifies to load only authorized customer.
There are some more entities which are mapped to customer entity with key-many-to-one relationship.
After loading of the mapping file while validation of foriegn key constraints its failing
Foreign key constraint failed "must have same number of columns as the referenced primary key"
This is happening only in some environments not all.
--
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
More information about the hibernate-issues
mailing list