[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1109?page=c...
]
Thijs Thiessens commented on HHH-1109:
--------------------------------------
You are right. Therefore, in my opinion null values in composite keys should be
configurable in the case you want to support legacy schemes.
composite-key does not support null-values
------------------------------------------
Key: HHH-1109
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1109
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.0.5
Environment: [org.hibernate.type.EmbeddedComponentType.hydrate(...)#425]
Reporter: Holger Bartnick
Attachments: componentType-fix-nullkey-compositekey.patch
Original Estimate: 1 day
Remaining Estimate: 1 day
At present all legacy data with null-values in its composite-key could not be read
properly by hibernate.
While hibernate processes the resultset it returns null for that record and steps over to
the next one.
Think of a db-view, which combines two (or more) tables by outer-join.
(that seems only necessary for crude legacy data indeed... but it´s not that unusual as
you think)
The workaround is to use a db-generated identifier for each view-record (ex. combining
the nullable-id fields).
It would be fine, if hibernate is not reliant on that. ;-)
To allow having composite-keys with partly null-Values, you could think of moving the
"unsaved-value"-attribute
of the "composite-key"-tag to
"key-property|key-many-to-one"-Tags...?!
---
Mmmh... saw you´ve done something with "columnNullness" in ver 3.1beta2.
Perhaps it is fixed in there...
also seen on HB-613
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira