Business Object from Joined Tables


Author
Message
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
I have many requirements to be able to show on a ListView/Combobox the results from multiple joined tables. (e.g.Show Transactions but join in the Stock Description from a joined file). I have gone through a lot of the threads here to get hints , and have it working fine on a Combobox , but would like to ensure there are no Gotchas for any of the other list types , or maybe there is a better way.

1. Say my data is required from two Tables, Tran and Products, where Products gives the description
2. I have set up a 'Dummy' business Object which will be used for ALL my Joined Tables (Query ? Can I do this with just one Dummy Business Object for ALL my lists)
3. I have a Stored Proccdure which Joins the Tables Tran and Products
4. I specify the Dummy Business Object as the BusinessObjectType  in the PopulationDataSourceSettings 9With a different Stored procedure depending on the  Tables)
(When entering the Columns, I type in the column names as they will not be in the buisness Object when it is initially set up)
5. My main concern is that I am using in effect  a Multi Table Business Object (whereas when Business Objects are being set up they are limited to One Table only) and wonder if this will cause any problems in SF

 

Any comments would be helpful

Replies
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
As Greg pointed out the only issue is if you try to do an update, add or delete. The advantage of adding a dummy BO to the DDT is that all of the fields and property descriptors are generated for you. If you use scalar methods or add additional fields to your SELECT or stored procedures using a "real" BO, you have to add the custom properties and descriptors if you want to bind to them. However if you do an add, update, delete on a "real" BO, it will ignore the added fields. I've used both approaches. My only issue is that using the dummy BO results in "invalid" methods in the BO. At one time I was overriding the update, delete, and add methods to prevent any exception if they were called but I found it to be a lot of work. What I'd like to see is an additional BO class added to SF that was "read or lookup only" and had all of the add, delete, and update methods removed.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
That's an excellent idea Larry. I second that suggestion!
Ger Cannoll
Ger Cannoll
Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)Advanced StrataFrame User (866 reputation)
Group: StrataFrame Users
Posts: 430, Visits: 507
Hi guys. Many thanks for all your comments which I have found very helpful.

The reson I thought that a Dummy BO would be the best of the available options to handle multiple joins is that it sems to be the most straightforward......just set up an additional Dummy BO with just one field...no need to set up views etc on the dataabase.

Also, these dummy BO would just be set up for lists (i.e. Read only) so unless I code something specifically in to 'Save' the Bo, there should be no possibility that attemps will be made to update the backend tables.....I will have a separate BO (the real BO) to do this.

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