You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an entity is added to a HasMany relationship collection, it should be added to the Ids in HasManyIds. That is currently not the case within the same session.
[Model]
public class Person
{
[HasManyIds("pizzas")]
public IEnumerable<Guid> PizzaIds { get; set; }
[HasMany]
public ICollection<Pizza> Pizzas { get; set; }
}
var moarPizza = session.Get<Pizza>(moarPizzaId);
person.Pizzas.Add(moarPizza);
await session.Update(person);
// FAILS in same session. Succeeds in new session
Assert.True(person.PizzaIds.Contains(moarPizzaId));
The text was updated successfully, but these errors were encountered:
This is fixed by #77 if session.Update was called. If the Ids are accessed before session.Update is called, they will still return outdated information
If an entity is added to a HasMany relationship collection, it should be added to the Ids in HasManyIds. That is currently not the case within the same session.
The text was updated successfully, but these errors were encountered: