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

I have a collection mapped via hibernate as follows:

the relevant getter is public List getCauses() { return this.causes; } Idea underlines in red the "List" return value saying that "]]> 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 comments

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 >
<property name="description" column="Description" type="string"/>
<many-to-one name="causeType" column="CauseTypeId" />
<many-to-one name="causeSource" column="CauseSourceId" />
</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?

0

Please sign in to leave a comment.