Hi, I have a question regarding indexing Embedded Set<Object>.
Say I have a model A like this:
Code:
@Embeddable
class A {
@Field
private String name;
@Field
private Boolean editable;
@IndexedEmbedded
private B bObject;
@ContainedIn
@OneToMany
@JoinColumn(name = "setOfA")
private C forC;
}
where, B is, say
Code:
@Embeddable
class B {
@Field
private int intValue;
@Field
private boolean boolValue;
}
Now, I have a class C,
Code:
@Entity
class C {
//How to annotate this to enable search like setOfA.name="searchQuery", or setOfA.bObject.intValue=5
@ElementCollection
private Set<A> setOfA;
}
Now how do I annotate setOfA to enable searches like setOfA.name="query", or setOfA.bObject.intValue=5.
I see that I can create custom Bridge, but can't figure out what the Bridge should do, specially to enable search like setOfA.bObject.intValue = 5.
I also asked this on stackoverflow, and got a suggestion to use @ContainedIn (
http://stackoverflow.com/questions/3578 ... low-search), but that didn't work, getting
Code:
Caused by: org.hibernate.MappingException: Could not determine type for com.*.C, at table: C_setOfA, for columns: [org.hibernate.mapping.Column(setOfA.forC)]
I am posting here for better visibility, sorry if linking so is not allowed.
Any help is appreciated. Thanks.