-
Notifications
You must be signed in to change notification settings - Fork 930
Open
Description
If proxy interface IProxy implements multiple interfaces with identifier property:
interface IReadOnlyId
{
int Id { get; }
}
interface IId
{
int Id { get; set; }
}
//IProxy contains both IReadOnlyId.Id and IId.Id getters. It's ambiguous but valid code
interface IProxy : IId, IReadOnlyId
{
}
public class Entity : IProxy
{
public virtual int Id { get; set; }
}Currently generated proxy initializes proxy IProxy on IReadOnlyId.Id access:
IReadOnlyId entity = session.Load<IProxy>(id);
Console.WriteLine(entity.Id); // <- entity will be initialized on entity.Id accessIt should not trigger proxy initialization.
Possible solution: implement class for interface proxy members implicitly.
Metadata
Metadata
Assignees
Labels
No labels