[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?

0

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
Avatar
Permanently deleted user

Great, thanks.

0

请先登录再写评论。