﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Multiple Tables in an object</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 08 Apr 2026 05:39:43 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost11010.aspx</link><description>If you want to override a field property that maps to a field in the database, then you will need to use the Custom Code option within the BOMapper and supply the code that you want it to spit out when it creates the partial class.&lt;/P&gt;&lt;P&gt;If you want to create a second property (instead of replacing the property itself), you'll want to create a new property in the main code file so that it does not get overwritten when the partial class is re-created again.&amp;nbsp; The easiest way to do this is to copy one of the fields from the designer file, paste it into the main code file (attributes and all) and modify it the way you want it.&amp;nbsp; Then, just override the GetCustomBindablePropertyDescriptors() method and return the property descriptor for that property.&amp;nbsp; (You should be able to search either the help or the forum for "GetCustomBindablePropertyDescriptors" because it might show you some more information and show you what happens when you don't provide a descriptor :D).</description><pubDate>Wed, 22 Aug 2007 14:44:17 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost45.aspx</link><description>Let's say I have a strongly-typed dataset that contains multiple tables.&amp;nbsp; And, let's call this dataset 'Orders'.&amp;nbsp; How can I create an object with Strata-frame?&amp;nbsp; All of the documentation points to one table per object.&amp;nbsp; Not that the attachment is a 'real-life' example.&amp;nbsp; But, I don't want to upload what I use at our company for public consumption.</description><pubDate>Wed, 22 Aug 2007 14:44:17 GMT</pubDate><dc:creator>Robert Harvey</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10991.aspx</link><description>Ok...I put the property in "my part" of the partial class and this seems to have fixed the problem!</description><pubDate>Wed, 22 Aug 2007 09:52:24 GMT</pubDate><dc:creator>choyt</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10989.aspx</link><description>Hi Folks&lt;/P&gt;&lt;P&gt;I have this working with one caveat. &lt;/P&gt;&lt;P&gt;I have a "Users" table that hold basic inforamtion such as First and Last name but am using forms authentication and want to take full advantage of that so am using the aspnet_ tables as well. To do this, I am joining together my Users table with aspnet_Users and aspnet_Membership. There is no data of use to me in the aspnet_Users table but there is quite a bit of useful info in the membership table.&lt;/P&gt;&lt;P&gt;To do this the way that has been described, I am customizing the UserName field in my user table (the FK to the UserName field in aspnet_Users) and replacing it with a BO that I mapped against aspnet_membership. I would much rather keep my user name field intact but there is no way in the object mapper to create a field. You can only use (override) fields that are aleady part of the&amp;nbsp;underlying database&amp;nbsp;table. &lt;/P&gt;&lt;P&gt;I can see these work arounds&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a "fake" field in the database to fool the mapper into believing there is an extra field.&lt;/LI&gt;&lt;LI&gt;Manually modify the designer.vb file each time I do a build (kind of&amp;nbsp;pain but not out of the question)&lt;/LI&gt;&lt;LI&gt;Overwriting my UserName field.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Is there something simple and basic I'm missing or is my understanding correct?&lt;/P&gt;&lt;P&gt;Thanks! :D</description><pubDate>Wed, 22 Aug 2007 09:05:23 GMT</pubDate><dc:creator>choyt</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10450.aspx</link><description>Thanks Ben.&amp;nbsp; I hadn't seen the underscore naming convention except for in the StrataFrame code but I&amp;nbsp;like it and think I will use it as well.</description><pubDate>Thu, 19 Jul 2007 10:31:49 GMT</pubDate><dc:creator>Michael Cobb</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10444.aspx</link><description>The underscore is just a convention that we use internally.&amp;nbsp; It's not a .NET naming convention.&amp;nbsp; However, with VB, when you create a "Public WithEvents MyField As SomeType" field on your class, VS behind the scenes creates a field named the same as your field, but with an underscore (_MyField) and instead of creating a public field, it wraps the implicit private (_MyField) with a public property.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Other than that, I don't know of any convention that says that your private fields (or any other member fields) need to start with an _.&amp;nbsp; We just do because we like the convention.&amp;nbsp; I've looked through the .NET framework using Reflector a few times, and in most of their stuff, they either start their private fields with an _ and camel case them or just camel case them (_myField or myField).&amp;nbsp; It's entirely up to you.&lt;/P&gt;&lt;P&gt;I can't find the MSDN page that lists the .NET naming conventions, but this guy has most of them listed.&amp;nbsp; Look down at the one that says "Class-Level Private and Protected Variables"&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.irritatedvowel.com/Programming/Standards.aspx"&gt;http://www.irritatedvowel.com/Programming/Standards.aspx&lt;/A&gt;</description><pubDate>Thu, 19 Jul 2007 09:01:50 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10438.aspx</link><description>Thanks a lot for this Robert.  I'll file it away for when my SF level rises :D</description><pubDate>Wed, 18 Jul 2007 20:17:24 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10437.aspx</link><description>Thanks Ben - I knew it wasn't part of the Strataframe Sample Data but it was referenced in the zip you posted so I thought you might have used his XSD to add the tables to the sample data in some way everyone but me knew about ":)</description><pubDate>Wed, 18 Jul 2007 20:16:00 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10410.aspx</link><description>Ben,&lt;/P&gt;&lt;P&gt;In the following declaration statement what is the naming convention calling for the variable name to begin with an underline?&amp;nbsp; Is this typically used for property variables?&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;WithEvents&lt;/FONT&gt;&lt;FONT size=2&gt; _State &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; StateBO()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]</description><pubDate>Wed, 18 Jul 2007 12:15:14 GMT</pubDate><dc:creator>Michael Cobb</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10409.aspx</link><description>Charles:&amp;nbsp; The way I did this was to add a State table to the SF Sample database.&amp;nbsp; The table consists of StateName and StateCode columns.&amp;nbsp; StateName has the long names and StateCode has the abbreviations.&amp;nbsp; Then I went into the VB.NET CRMApplication sample.&amp;nbsp; I added a BO called StateBO to that project and used the BusinessObjectMapper to create the partial class for it.&amp;nbsp; &lt;P&gt;I added the following custom code to the StateBO for a parameterless data retrieval method:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' Fills the business object with all records order by primary key&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;remarks&amp;gt;&amp;lt;/remarks&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; FillAllStateTable()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Establish local&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Dim&lt;/FONT&gt;&lt;FONT size=2&gt; loCommand &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt; SqlCommand()&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Create the command&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;loCommand.CommandText = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"SELECT * FROM State ORDER BY StateCode"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Execute the command&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FillDataTable(loCommand)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;#&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Region&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Then I modified the custom code for the CustomersBO by adding the following lines of code only:&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;WithEvents&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; _State &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;New&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt; StateBO()&lt;/FONT&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;[codesnippet]&lt;FONT size=2&gt;&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' This method handles the Navigated event of the Customers business object to allow&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' you to set the filter on the State business object.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' You can filter the StateBO to only show records that match the current record&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' within the CustomersBO.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;/summary&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;''' &lt;/FONT&gt;&lt;FONT color=#808080 size=2&gt;&amp;lt;param name="e"&amp;gt;&amp;lt;/param&amp;gt;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Private&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; CustomersBO_Navigated(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; e &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; MicroFour.StrataFrame.Business.NavigatedEventArgs) &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Handles&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.Navigated&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;'-- Set the filter on the internal StateBO&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=2&gt;' (Only necessary if the CompanyBO will contain more than one record)&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;._State.Filter = &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"StateCode = '"&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;CType&lt;/FONT&gt;&lt;FONT size=2&gt;(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.CurrentRow(&lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"cust_State"&lt;/FONT&gt;&lt;FONT size=2&gt;), &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;) &amp;amp; &lt;/FONT&gt;&lt;FONT color=#a31515 size=2&gt;"'"&lt;/P&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;[/codesnippet]&lt;/P&gt;&lt;P&gt;Next I did a BuildAll so that the Company and State Business Objects were recompiled.&lt;/P&gt;&lt;P&gt;To test it, I moved&amp;nbsp;the State Textbox (Textbox9) to the bottom of the form (you could just as easily remove it) and replaced it with a StrataFrame ComboBox on which I set the following properties: BusinessObject=Customers, BindingField = cust_State, DropDownStyle=DropDownList, PopulationType=BusinessObject, PopulationDataSourceSettings=StateBO.FillAllStateTable().&amp;nbsp; The PopulationDataSourceSettings property gets built by clicking the ellipsis on the property.&amp;nbsp; Inside there I put {0} under Display Member and Drop-Down Display, StateName under ValueMember and added StateCode to DisplayMember.&lt;/P&gt;&lt;P&gt;When you run the form the combo box will display the state code for the current record as you browse.&amp;nbsp; If you edit/add a record the combo box displays a list of all possible state codes.&amp;nbsp; If you change a value and save it, the Customers table will save the state name associated with the state code.&lt;/P&gt;&lt;P&gt;That should get you started if you're still looking at this.</description><pubDate>Wed, 18 Jul 2007 12:09:08 GMT</pubDate><dc:creator>Michael Cobb</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10319.aspx</link><description>Ah, I gotcha... the XSD that Robert posted is not part of the StrataFrameSample database... it was something else that he was working on (or maybe he modified his sample database, I dunno).&amp;nbsp; So, it's starting to make sense why you thought that the XSD he posted was part of the SF sample.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I'm glad you found a few tools to convert the XSDs and so forth.&amp;nbsp; But just remember, the only 2 sources of structures for the BOMapper are the DDT and the database itself on the server.</description><pubDate>Mon, 16 Jul 2007 15:57:05 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10313.aspx</link><description>:) uh, no I have the SF sample database installed.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/d45f9502-5fa3-48d4-b387-936f.jpg"&gt;&lt;/P&gt;&lt;P&gt;My point was the data schema Robert send was for two tables that aren't part of the sample data&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/1e47706d-7b98-449b-8521-b0dd.jpg"&gt;&lt;/P&gt;&lt;P&gt;And I was wondering if before creating the sample you had somehow magically imported from the schema into a DB so you could map with the BO mapper.&lt;/P&gt;&lt;P&gt;I think I was having a bad expressing myself day :D&lt;/P&gt;&lt;P&gt;( but it did get me Googling and it turns out there is indeed a way to create XSD Schemas from SQL 2005 with t_sql and then the there a way of creating data structures in SQL from schemas, but the format Robert used wasn't the one, so I guess that wasn't the intention )&lt;/P&gt;&lt;P&gt;Just trying to catch up on the huge gaps in my basic knowledge of VS/VB tricks :w00t:</description><pubDate>Mon, 16 Jul 2007 10:44:35 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10300.aspx</link><description>[quote]Is there a command to create the tables in SQL Server from the XSD schema ?[/quote]&lt;/P&gt;&lt;P&gt;Not that I'm aware of... I wouldn't suspect that it would be in SQL Server Management Studio, but it certainly wouldn't surprise me if there was a 3rd party tool that would do it.&amp;nbsp; &lt;/P&gt;&lt;P&gt;[quote]I downloaded the sample and see to BOs, but I of course have nothing to map them to in sql server.[/quote]&lt;/P&gt;&lt;P&gt;Hrm... the StrataFrameSample database with sample data should be deployed by the SF install to the same server that the StrataFrame database was installed.&amp;nbsp; So, unless you skipped that option, you should have some sample data somewhere.</description><pubDate>Mon, 16 Jul 2007 09:04:45 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10287.aspx</link><description>Trying to follow along here and perhaps someone will take pity on the XML challenged.  I see the XSD schema so I can easily visualize the table structures we're talking about.  I see these are not tables currently in the SF sample data.  &lt;br&gt;
&lt;br&gt;
I downloaded the sample and see to BOs, but I of course have nothing to map them to in sql server.&lt;br&gt;
&lt;br&gt;
Since Robert passed his data structure as an XSD Schema and Ben had that data structure in the BO in the sample I think I might be missing something everyone who is not VS - XML challenged knows.&lt;br&gt;
&lt;br&gt;
Is there a command to create the tables in SQL Server from the XSD schema ?  Aside from doubleclicking the schema and seeing it open into a nice data diagram in VS2005 are there other tricks you can do with it in sql server / VS / DDT that one should know about ?&lt;br&gt;
&lt;br&gt;
(understanding everything else involved in the complex business object sample will just require my wading out of the newbie phase in SF )&lt;br&gt;
&lt;br&gt;
Any guidance appreciated.  &lt;br&gt;
:unsure:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</description><pubDate>Fri, 13 Jul 2007 21:06:38 GMT</pubDate><dc:creator>Charles R Hankey</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10248.aspx</link><description>No, sorry, there aren't any samples that include any of the data for the business object mapper (because we would have to put records into the StrataFrame database to do so...).&amp;nbsp; So, to explain things a bit better... on the custom code, you would want to put the exact code that would be replace the property that you are customizing.&amp;nbsp; Meaning that whatever you put in the custom code box will be placed in the partial class as the code for that field property; so, if you wanted to not include a field, then just customize it and leave it completely blank...&lt;/P&gt;&lt;P&gt;As for your second question, yes, you would want to leave the Create Field Descriptor unchecked or the BOMapper will create the FieldPropertyDescriptor for that property.</description><pubDate>Fri, 13 Jul 2007 09:10:00 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost10236.aspx</link><description>Hi Ben.&amp;nbsp; I'm struggling to understand the VB&amp;nbsp;sample.&amp;nbsp; &lt;/P&gt;&lt;P&gt;[quote]You will have to go into the Business Object Mapper and "&lt;FONT class=SearchHighlight&gt;custom&lt;/FONT&gt;ize" the State field on the CompanyBO and set it to use "&lt;FONT class=SearchHighlight&gt;custom&lt;/FONT&gt; code" that will return the readonly property containing the StateBO.[/quote]&lt;/P&gt;&lt;P&gt;Do I need to create a custom field property for the state in the CompanyBO?&amp;nbsp; In the Business Object Mapper, what do I need to put in the "custom code" for the State field on the CompanyBO?&amp;nbsp; &lt;/P&gt;&lt;P&gt;[quote]I updated the MicroFour StrataFrame AddIns.dll to modify the Business Object Mapper so that it will not create a Field&lt;FONT class=SearchHighlight&gt;PropertyDescriptor&lt;/FONT&gt; for a field overriden with &lt;FONT class=SearchHighlight&gt;custom&lt;/FONT&gt; code. It will be available in the next update. So, if you reproduce this sample before the next update, you will just have to delete the Field&lt;FONT class=SearchHighlight&gt;PropertyDescriptor&lt;/FONT&gt; that is created for the State field on the CompanyBO (it won't work and will just assume the field is still a System.String).&lt;BR&gt;[/quote]&lt;/P&gt;&lt;P&gt;Meaning I would not check the box to create a descriptor?&amp;nbsp; I apologize for being slow.&amp;nbsp; Is there a sample project that illustrates the use of the BO Mapper to create custom code?</description><pubDate>Thu, 12 Jul 2007 10:04:41 GMT</pubDate><dc:creator>Michael Cobb</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost72.aspx</link><description>OK, I've uploaded a sample for both C# and VB.  Both are identical except where they add the handlers for the events, of course.  A little explaination is in order for the samples:&lt;br&gt;
&lt;br&gt;
1) All of the necessary code is contained within the "Necessary Code for Complex Business Object" region in the CompanyBO.* file.&lt;br&gt;
2) No extra code was added to the StateBO.&lt;br&gt;
3) You will have to go into the Business Object Mapper and "customize" the State field on the CompanyBO and set it to use "custom code" that will return the readonly property containing the StateBO.&lt;br&gt;
4) I updated the MicroFour StrataFrame AddIns.dll to modify the Business Object Mapper so that it will not create a FieldPropertyDescriptor for a field overriden with custom code.  It will be available in the next update.  So, if you reproduce this sample before the next update, you will just have to delete the FieldPropertyDescriptor that is created for the State field on the CompanyBO (it won't work and will just assume the field is still a System.String).&lt;br&gt;
&lt;br&gt;
---------------------------&lt;br&gt;
Remember, a business object in StrataFrame is just a class, so anything you want to do with it, you can.  Just don't modify the designer file outside of the "Component Implementation" region or your changes will be overriden.</description><pubDate>Tue, 22 Nov 2005 09:19:44 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost62.aspx</link><description>I'll get it posted ASAP in the morning.</description><pubDate>Mon, 21 Nov 2005 18:59:52 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost56.aspx</link><description>But, you can post in C#.&amp;nbsp; Either way works for me.</description><pubDate>Mon, 21 Nov 2005 18:21:05 GMT</pubDate><dc:creator>Robert Harvey</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost55.aspx</link><description>I have created a similar object using CSLA.&amp;nbsp; But, it was an icky amount of code to accomplish this.&amp;nbsp; I started with a base object that inherited System.Data.Dataset.&amp;nbsp; Then I inherited that object and exposed a dataset property.&amp;nbsp; A getOrder method to fill it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oh yeah....I use VB.&amp;nbsp;</description><pubDate>Mon, 21 Nov 2005 18:18:57 GMT</pubDate><dc:creator>Robert Harvey</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost54.aspx</link><description>Perhaps you could post this sample for downlaod. I use C#.&lt;br&gt;
&lt;br&gt;
Thanks</description><pubDate>Mon, 21 Nov 2005 17:42:08 GMT</pubDate><dc:creator>Daniel Essin</dc:creator></item><item><title>RE: Multiple Tables in an object</title><link>http://forum.strataframe.net/FindPost50.aspx</link><description>OK, &lt;br&gt;
&lt;br&gt;
I definitely agree that you should never post anything on this forum that is part of your company’s product.  And this example definitely says what you need it to say.&lt;br&gt;
&lt;br&gt;
There are a few ways you could handle this all are based on the assumption that the sample you gave actually comprises 2 tables within the database (we are talking about a relational database, right?).&lt;br&gt;
&lt;br&gt;
1)Create a business object (we’ll call it CompanyBO) and map it to the Company table.  Create a business object (we’ll call it StateBO) and map it to the State table.  Work with the two separate business objects in code (when you populate the CompanyBO, you can turn around and populate the StateBO etc...)&lt;br&gt;
&lt;br&gt;
2)(the better way) Create a complex business object made up of a business object within a business object (result will be similar to the way an Object Relational Mapper would handle it).  You could override the State property to return a StateBO object that is automatically filtered based upon the ParentRelationship.  When you populate the CompanyBO, it would automatically populate an internal StateBO that would be returned through the State property.&lt;br&gt;
&lt;br&gt;
What language are you working with and I could send you a sample project on how I would do it.</description><pubDate>Mon, 21 Nov 2005 17:07:47 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>