Hi there,
as I understand it, DoNotPerformAddIfPresent will prevent entities with the same PK definition of being added to an EntityCollection.
I did the following test with an entity
Me.Auftragsposition.AuftragsPosDokumente.DoNotPerformAddIfPresent = True
_auftragsPosDoc = New MyAuftragsPosDokumenteEntity(Me.Auftragsposition.AuftragsNr, Me.Auftragsposition.Auftragsposition, 14)
_auftragsPosDocTmp = New MyAuftragsPosDokumenteEntity(Me.Auftragsposition.AuftragsNr, Me.Auftragsposition.Auftragsposition, 14)
Me.Auftragsposition.AuftragsPosDokumente.Add(_auftragsPosDoc)
Me.Auftragsposition.AuftragsPosDokumente.Add(_auftragsPosDocTmp)
As you can see I am using the PK constructor of the entity and after the operation I see two identical elements in the collection. -
Am I missing on something?
Best regards