Hi all..
I'm a little confused about when/where to use an inheritsFrom: construct in an SQL data source. Prior to finding SmartClient I was toying around with another framework (jspresso) which allowed nested data sources of sorts. I envisioned that I could (for instance) create an Address.ds.xml file containing what goes into an address (street address, city, zip,etc) along with the proper field sizes, validation criteria, etc.. Then for an Organization data source, I could say "inheritsFrom: Address" and each instance of my Organization class would also have an address associated with it. When I played around with this last night and used the DataSource tool to create my tables, I did not see any Address "stuff" in my Organization table even though it was set to Inherit from it (but I may have not 'seen' it as it was VERY late). So, a question or two if you don't mind :
1) Is the "Address" stuff (fields and whatnot) supposed to be pulled in willy nilly into the inheriting class (Organizations in this example) or would Organizations just have a foreign key to an "Address" record?
2) Is this the proper scenario to use the inheritsFrom: concept or is it meant for some other situation I'm not thinking of?
Thx!!
I'm a little confused about when/where to use an inheritsFrom: construct in an SQL data source. Prior to finding SmartClient I was toying around with another framework (jspresso) which allowed nested data sources of sorts. I envisioned that I could (for instance) create an Address.ds.xml file containing what goes into an address (street address, city, zip,etc) along with the proper field sizes, validation criteria, etc.. Then for an Organization data source, I could say "inheritsFrom: Address" and each instance of my Organization class would also have an address associated with it. When I played around with this last night and used the DataSource tool to create my tables, I did not see any Address "stuff" in my Organization table even though it was set to Inherit from it (but I may have not 'seen' it as it was VERY late). So, a question or two if you don't mind :
1) Is the "Address" stuff (fields and whatnot) supposed to be pulled in willy nilly into the inheriting class (Organizations in this example) or would Organizations just have a foreign key to an "Address" record?
2) Is this the proper scenario to use the inheritsFrom: concept or is it meant for some other situation I'm not thinking of?
Thx!!
Comment