If I have the following tables
CustomField
PK CustomFieldID
FK ItemID
FK FIeldID
Value
Sort
Field
PK FieldID
Name
Item
PK ItemID
Name
Description
Price
They are related this way
[Field] <--1:m [CustomField] m:1--> [Item]
So that CustomField is m:1 Item and CustomField is m:1 Field
The problem that I am having is that when I use the following code:
For Each Entity As EntityBase In CustomField.GetDependentRelatedEntities
' Do stuff with each of the dependant entities
Next
I only have a dependant entity for Item, not for Field. I checked the constraints and they are vitually identical, I am wondering if this might just be a code generation problem, but wanted to query you guys first to make sure that I wasn't misusing the GetDependantRelatedEntities method.
One additional thing regarding this item. This function:
Public Overrides Function GetDependentRelatedEntities() As ArrayList
Dim toReturn As New ArrayList()
' each related entity which is dirty, is added to the collection, and will be saved first.
If Not _field Is Nothing Then
toReturn.Add(_field)
End If
If Not _item Is Nothing Then
toReturn.Add(_item)
End If
Return toReturn
End Function
is what fires and _field is always nothing, while _item is an ItemEntity. I am beginning to think that I am looking for the wrong results from this method. Any help would be greatly appreciated.
Best Regards and thanks for the help.
Hal