Message:
The following issue has been closed.
Resolver: Gavin King
Date: Fri, 11 Jul 2003 11:15 PM
I applied this patch
---------------------------------------------------------------------
View the issue:
http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-169
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HB-169
Summary: FK to class with composite PK
Type: Bug
Status: Closed
Priority: Major
Resolution: FIXED
Project: Hibernate2
Components:
core
Fix Fors:
2.0.2
Versions:
2.0.1
Assignee: Gavin King
Reporter: Gavin King
Created: Wed, 9 Jul 2003 6:37 PM
Updated: Fri, 11 Jul 2003 11:15 PM
Description:
https://sourceforge.net/forum/forum.php?thread_id=894732&forum_id=128638
I think I found the cause. NormalisedEntityPersister.postInstantiate() seems to lack knowledge of composite objects within ID types (doesn't use getColumnSpan()).
By adding / replacing the following code (from EntityPersister) I got it to work:
...
Type[] subtypes = actype.getSubtypes();
...
int j = 0;
for (int i = 0; i < props.length; i++)
{
String subidpath = idpath + StringHelper.DOT + props[i];
String[] componentColumns = new String[subtypes[i].getColumnSpan(factory)];
for (int k = 0; k < componentColumns.length; k++)
{
componentColumns[k] = columns[j++];
}
columnNamesByPropertyPath.put(subidpath, componentColumns);
mods.put(subidpath, actype.getSubtypes()[i]);
}
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
|