BO.Add doesn't FilterChildRecords


Author
Message
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I found that, BOAdd() doesn't filter child record. Is it by design?

I also found that, previously BO.Add() will call navigate() method which will also FilterChildRecords. However, it is remarked and replace with ForceNavigatedAndBoundRefresh() which doesn't filterchildrecords.



Please advice. Personally, I think Add() should auto filterchildrecords as well.



Thank you
Replies
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I think I used to face the problem whereby, the newly added child record, would be missing. it happens if AutoIncrement approach used to generate PK value. Is it the originally problem?



If so, Guid assignment in SetDefaultValues() should not cause the problem .. even though I call FilterCHildRecords() after ParentBO.Add(), am I right?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Is it the originally problem?

No.  And I will throw your next question in here as well, a GUID would not resolve the problem.  The problem is that if a filter is applied, let's say on a foreign key contraint, and a new record is added to the child BO, that new record will be immediately hidden the instant that it is created because of that filter.  This is just how ADO.NET views work.  So in order to get around this problem, remove the filter, add the child record and set the default values (i.e. the foreign key contraint column) and then reapply the filter and you will be OK.

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