| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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? |
|
#2
| |||
| |||
| 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? |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.