Adding the code for the sake of discussion and completeness:
@Entity
@Indexed
public class Book {
// ...
private BookEmbeddable emb;
@Embedded
@IndexedEmbedded
public BookEmbeddable getEmb() {
if (emb == null) {
emb = new BookEmbeddable();
}
return emb;
}
public void setEmb(BookEmbeddable emb) {
this.emb = emb;
}
}
@Embeddable
public class BookEmbeddable {
private Map<Long, String> categories;
@ElementCollection
@IndexedEmbedded
@MapKeyColumn
@Field(bridge = @FieldBridge(impl = CategoriesBridge.class))
public Map<Long, String> getCategories() {
if (categories == null) {
categories = new HashMap<Long, String>();
}
return categories;
}
public void setCategories(Map<Long, String> categories) {
this.categories = categories;
}
}
So updating Book#emb is the problem, right?
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Adding the code for the sake of discussion and completeness:
So updating Book#emb is the problem, right?