[hibernate]<composite-element> attribute type should be anEmbeddable

This is a discussion on [hibernate]<composite-element> attribute type should be anEmbeddable within the J2EE forums in Framework and Interface Programming category; I have a collection mapped via hibernate as follows: <list name="causes" table="Causes"> <key column="AlertId"/> <index column="id"/> <composite-element class="Cause"> <property name="description" column="Description" type="string"/> <many-to-one name="causeType" column="CauseTypeId" class="CauseType"/> <many-to-one name="causeSource" column="CauseSourceId" class="CauseSource"/> </composite-element> </list> the relevant getter is public List<Cause> getCauses() { return this.causes; } Idea underlines in red the "List<Cause>" return value saying that "<composite-element> attribute type should be an Embeddable". What does this mean? I see a javax.persistence.Embeddable annotation but 1) I'm not using JPA, only plain hibernate, 2) even if I add that annotation to my Cause class the error stripe does not go away. Is this a bug ...

Go Back   Application Development Forum > Framework and Interface Programming > J2EE

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 02-07-2008, 06:59 AM
Davide Baroncelli
Guest
 
Default [hibernate]<composite-element> attribute type should be anEmbeddable

I have a collection mapped via hibernate as follows:

<list name="causes" table="Causes">
<key column="AlertId"/>
<index column="id"/>
<composite-element class="Cause">
<property name="description" column="Description" type="string"/>
<many-to-one name="causeType" column="CauseTypeId" class="CauseType"/>
<many-to-one name="causeSource" column="CauseSourceId" class="CauseSource"/>
</composite-element>
</list>

the relevant getter is

public List<Cause> getCauses() {
return this.causes;
}

Idea underlines in red the "List<Cause>" return value saying that "<composite-element> attribute type should be an Embeddable". What does this mean? I see a javax.persistence.Embeddable annotation but 1) I'm not using JPA, only plain hibernate, 2) even if I add that annotation to my Cause class the error stripe does not go away.

Is this a bug in IDEA or something i don't understand?
Reply With Quote
  #2  
Old 02-07-2008, 10:53 AM
Gregory Shrago (JetBrains)
Guest
 
Default Re: [hibernate]<composite-element> attribute type should be anEmbeddable

The fix will be available from the next 7.0.3. EAP.

Davide Baroncelli wrote:
> I have a collection mapped via hibernate as follows:
>
> <list name="causes" table="Causes">
> <key column="AlertId"/>
> <index column="id"/>
> <composite-element class="Cause">
> <property name="description" column="Description" type="string"/>
> <many-to-one name="causeType" column="CauseTypeId" class="CauseType"/>
> <many-to-one name="causeSource" column="CauseSourceId" class="CauseSource"/>
> </composite-element>
> </list>
>
> the relevant getter is
>
> public List<Cause> getCauses() {
> return this.causes;
> }
>
> Idea underlines in red the "List<Cause>" return value saying that "<composite-element> attribute type should be an Embeddable". What does this mean? I see a javax.persistence.Embeddable annotation but 1) I'm not using JPA, only plain hibernate, 2) even if I add that annotation to my Cause class the error stripe does not go away.
>
> Is this a bug in IDEA or something i don't understand?

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 04:53 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.