[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2235?page=c...
]
Ulf gohde commented on HHH-2235:
--------------------------------
Especially this note is interesting.
"(Note that in SQL the heading is not always a set of column definitions as described
above, because it is possible for a column to have no name and also for two or more
columns to have the same name. Also, the body is not always a set of rows because in SQL
it is possible for the same row to appear more than once in the same body.)"
which makes it clear that a primary key is optional. But that is not the point because
usually you have to be able to uniquelly identify a row. That is also true in my example
hence the unique constraint. The point is you can uniquely identify a row even if one of
the columns in the unique constraint is null.
Support for null map-keys in <map> mappings
-------------------------------------------
Key: HHH-2235
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2235
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.0.ga
Reporter: Igor Lobanov
Priority: Minor
I'm not sure if I should file it as a bug.
Hibernate requires index column for <map> mappings to be not null. This is required
by the code in AbstractCollectionPersister#readIndex(...), which raises exception if index
column is null. However, when I override collection persister and force readIndex method
to return null, everything seems to work fine. Hibernate allows me to work with maps using
null value as a key. Though I havn't tested it extensivly yet.
What is the reason for disallowing null values as a keys? If there are possible
complicated error conditions, then this issue is a feature request for null-values support
for <map> mappings. If there are no errors possible, then constraining such behavior
is probably wrong.
--
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