Exception when saving a parent/child with more than one field in primary key


Author
Message
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Yes, that was a bug, the Save() method was properly checking the PrimaryKeyIsAutoIncremented property before calling the PushDataToChildren() method, however, the SaveByForm was not checking the same value before calling it.

The resolution will be in the build we are releasing later today.  Thanks.

fparker
fparker
StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)StrataFrame Beginner (49 reputation)
Group: Forum Members
Posts: 31, Visits: 199
I have a screen with two business objects on it in a parent/child relationship.  The parent object has two fields in its primary key and the child has three.  The PrimaryKeyIsAutoIncremented property is set to false for both objects.  Whenever I try to save, the BusinessLayer.PushDataToChildren method throws a BusisnessLayerException.  The description is "The PrimaryKeyIsAutoIncremented property on business object [] cannot be True because the PrimaryKeyField property contains more than one field.".  I took a look at this method and it looks to me like the problem is that the check that determines whether or not this exception should be thrown looks only at the number of fields in the primary key and ignores the state of the PrimaryKeyIsAutoIncremented property. 

Fran Parker.

MaxQ Technologies, Inc.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search