[hibernate-issues] [Hibernate-JIRA] Assigned: (ANN-539) Generics and @Embedded doesn't work
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Sat Jan 20 16:09:44 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-539?page=all ]
Emmanuel Bernard reassigned ANN-539:
------------------------------------
Assign To: Paolo "Nusco" Perrotta
You're right, I did some tests with hibernate core and we can make it play nice if we explicit the type somehow.
But the reflection layer has to discover the type properly, I don't know how complex it is.
> Generics and @Embedded doesn't work
> -----------------------------------
>
> Key: ANN-539
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-539
> Project: Hibernate Annotations
> Type: Bug
> Versions: 3.2.1
> Environment: Hibernate 3.2.1, Oracle 10XE
> Reporter: Christophe Vanfleteren
> Assignee: Paolo "Nusco" Perrotta
> Attachments: generic.zip
>
>
> It doesn't seem to be possible to use a plain generic field as a component,
> for example:
> @Embedded
> private Range<Integer> bounds
> doesn't work (you get an "org.hibernate.AnnotationException: Property generic.GenericRange.min has an unbound type and no explicit target entity. Resolve this Generic usage issue or set an explicit target attribute (eg @OneToMany(target=) or use an explicit @Type") error.
> It does work when you extend the generic class in which you define the type (IntegerRange extends Range<Integer>)
> for example:
> @Embedded
> private IntegerRange bounds
> works
> I've attached some classes that demeonstrate this problem. This issue was raised before in http://opensource.atlassian.com/projects/hibernate/browse/ANN-406?page=comments, but was rejected since no testcase was provided.
--
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