StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
Issues
»
problem with BBS & standart .NET grid
problem with BBS & standart .NET grid
Post Reply
Like
2
problem with BBS & standart .NET grid
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
hector
hector
posted 13 Years Ago
ANSWER
Topic Details
Share Topic
Group: StrataFrame Users
Posts: 52,
Visits: 559
Hi folks :
I have a problem with BBS & standart .NET grid.
I have 2 BO on a form ... Let Say ParentBO and ChildBO...
As the names implys one is parent and other is child.
I setup ParentRelationship and ParentBusinessObject properties of these BO's properly as i always do.
I also setup the BBS and grid as in SF Help document (Topic :
Understanding the Business Binding Source (BBS) Control)
When I call ParentBO's Save I got a exception from SF's internal method PushDataToChildren.
When ı debug the problem i noticed that there is a one parent BO (ParentBO) but more then one child BO (which i never declared).
And these extra child BO's ParentRelationship was nothing...
This is first time I am using BBS...
When i worked on BBS deeply, I have also noticed that BBS ınternally, create an BO of same type for each row.
And I also noticed the problem is those Child BOs which internally added by BBS in SF.
Is this normal working logic of BBS?
Am i missing something in this picture?
Please advice ...
Kind regards...
Reply
Like
2
Replies
StrataFrame Team
S
StrataFrame Team
posted 13 Years Ago
ANSWER
Post Details
Share Post
S
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
Nope, you're not missing anything from the picture. The foremost limitation of the SF BusinessObjects is that they are a single object that contains many actual records. One class and one instance contains multiple records, but the BO only talks to one record at a time. It was designed this way to be similar to the way some older programming languages work. However, with .NET, it's an issue because .NET expects collections for data sources, and a BO is only a single object. So, the BO has to try to act like both a single object and a group of objects as well. That's why we created the BBS. It wraps a BO and turns it into a collection of instances. They all share their internal data table behind the scenes so they each behave like they are the same business object, but each is pointed to a specific row. Since all of the children share the same internal DataTable, they don't all need to be children of the parent, just one of them does... the original one you linked up in your code. I'll have to take a look at this and see why the ParentBusinessObject reference is getting set on all of the child objects.
FYI, this was the
first
item on our list of enhancements for SFv2; separate objects and collections. We use an entity model with multiple classes instead of shoehorning all logic into one class: Entity, EntityCollection, EntityWinFormsView, EntityWpfView, EntityWebView, etc. I'm sure you'll probably be one of our first beta users when we post it.
Reply
Like
2
Edhy Rijo
E
Edhy Rijo
posted 13 Years Ago
ANSWER
Post Details
Share Post
E
Group: StrataFrame Users
Posts: 2.4K,
Visits: 23K
Ben Chase (2/25/2013)
... I'm sure you'll probably be one of our first beta users when we post it.
Hi Ben,
Count me in, been waiting for SF2.0 for a long time<smile!!!>
Edhy Rijo
Reply
Like
2
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
problem with BBS & standart .NET grid
hector
-
13 Years Ago
Nope, you're not missing anything from the picture. The foremost...
StrataFrame Team
-
13 Years Ago
[quote][b]Ben Chase (2/25/2013)[/b][hr]... I'm sure you'll probably be...
Edhy Rijo
-
13 Years Ago
Hi Ben, As I can see the problem is here in this private method in...
hector
-
13 Years Ago
OK, I think I have an idea... the ParentRelationship is generally set...
StrataFrame Team
-
13 Years Ago
You are right Ben.. I did so.. I will try your sugession and let u...
hector
-
13 Years Ago
Problem is solved Ben... Thanks a lot indeed You are great:)
hector
-
13 Years Ago
Post Reply
Like
2
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search