I have a class Space which has association to SpacePermission. The configuration is to re-build index of SpacePermission on change "updatedAt" or "spaceLastUpdatedDate". But when if I update space permission fields and updateAt fields it is not re-building the indices when both are in same transaction. If the two are in other transactions, it is re-building the indices properly.
Am I missing some configuration here? What changes I should make to update though both are in one transaction?
@Entity @Indexed(index="Space") @Boost(value = PortalConstants.BOOST_SPACE) public class Space extends { @DocumentId(name = "spaceId") private Long id; @Field(name = "spaceName", index = Index.TOKENIZED, store = Store.NO) @Boost(value = PortalConstants.BOOST_TITLE) private String name;
@ContainedIn @OneToOne(mappedBy="spaceLastUpdatedDate", cascade = {CascadeType.PERSIST, CascadeType.REMOVE}) @IndexedEmbedded(depth = 2, prefix = "spacePermission_") private SpacePermission spacePermission;
@Field(name = "spaceLastUpdatedDate", index = Index.UN_TOKENIZED, store = Store.NO) @DateBridge(resolution=Resolution.MILLISECOND) private Date updatedAt; }
public class SpacePermission extends BaseDAOBean implements java.io.Serializable{
private static final long serialVersionUID = 1L;
@DocumentId private Long id; private Space space; private PermissionMaster memberPermission; @Field(name = "nonMemberPermissionId", index = Index.UN_TOKENIZED, store = Store.NO) private String nonMemberPermissionId;
}
|