google-code-export / dataobjectsdotnet

Automatically exported from code.google.com/p/dataobjectsdotnet
0 stars 0 forks source link

Setting key fields (via Entity..ctor) does not trigger referential integrity #619

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is simple example:

  public abstract class Link<TLeft, TRight> : Entity
    where TLeft : IEntity
    where TRight : IEntity
  {
    [Key(0), Field]
    public TLeft Left { get; private set; }

    [Key(1), Field]
    public TRight Right { get; private set; }

    public Link(TLeft left, TRight right)
      : base(left, right)
    {
    }
  }

Left and Right are set during call to base ctor. This assignment does not
trigger updating of paired associations.

See CustomEntityConnectionTest for details.

Original issue reported on code.google.com by denis.kr...@gmail.com on 15 Mar 2010 at 1:33

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Please keep in mind this still must not work for EntitySetItem<T> descendants 
(our 
internal EntitySet item representation). Or, more precisely, EntitySets must 
work as 
they do now after the bigfix ;)

Original comment by alex.yakunin on 16 Mar 2010 at 9:56

GoogleCodeExporter commented 9 years ago

Original comment by alexis.k...@gmail.com on 16 Mar 2010 at 10:51

GoogleCodeExporter commented 9 years ago

Original comment by alexis.k...@gmail.com on 16 Mar 2010 at 10:52

GoogleCodeExporter commented 9 years ago

Original comment by alexis.k...@gmail.com on 16 Mar 2010 at 1:41