I am having a problem with bidirectional caching of ManyToMany relationships
First Side Display:
HasManyToMany(x => x.Jobs)
.Table("ProfileSuggestStoryJob")
.AsSet()
.Cascade.None()
.ParentKeyColumn("ProfileSuggestStoryId")
.ChildKeyColumn("JobId")
.Cache.ReadWrite();
Second side display:
HasManyToMany(x => x.SuggestedProfiles)
.Table("ProfileSuggestStoryJob")
.AsSet()
.Cascade.None()
.ParentKeyColumn("JobId")
.ChildKeyColumn("ProfileSuggestStoryId")
.Inverse().Cache.ReadWrite();
The first side is responsible for inserting / updating / deleting, and is also well kept. But on the other hand, the cache is not updated, and the collection does not contain a newly added entity.
Without a cache, everything works fine ...
source
share