[hibernate-issues] [Hibernate-JIRA] Commented: (ANN-446) @OneToMany association in 3.2.0.cr2 does not work with simple element types.
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Thu Sep 28 16:40:24 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-446?page=comments#action_24664 ]
Emmanuel Bernard commented on ANN-446:
--------------------------------------
@OneToMany and simple element has been deprecated and documented as such 2 or 3 releases ago. use @CollectionOfElements
> @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.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list