[
http://opensource.atlassian.com/projects/hibernate/browse/ANN-446?page=all ]
Christian Bauer resolved ANN-446:
---------------------------------
Resolution: Rejected
No, JPA does not support this (yet). Read the spec before opening bug reports.
@OneToMany association in 3.2.0.cr2 does not work with simple element
types.
----------------------------------------------------------------------------
Key: ANN-446
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-446
Project: Hibernate Annotations
Type: Bug
Versions: 3.2.0.cr2
Environment: Hibernate 3.20.CR4
Reporter: Mike Brock
Hibernate has always allowed, as far as I can remember to map simple elements as unmapped
entities in a OneToMany association (such as Strings, Integers, etc).
In fact, hibernate-annotations 3.2.0.cr1 allowed this:
@OneToMany(targetEntity = String.class)
private Set<String> roles;
As of this latest release, we get a complaint that String is not a mapped entity. Is
this intentional or a bug? Previously, hibernate would create a simple two column join
table in such an association in a key-value arrangement to deal with this.
I am aware that @CollectionOfElements can be used to deal with this type of association
in the hibernate-annotations package.
Does it's existence imply that the Java Persistence API does not have support for
this type of association?
--
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