G
Guest
Hello
I need some hints and recommandations about accesing data, and instantiating business-objects with this data
we want to use untyped datasets to retrive data from db and hold this datasets in our business-entities
a small scenario
we have a business-object "purchaseorder" which aggregates some others business-object
eg: orderposition, amount, owner (user_entity), creator (user_entity), supplier ..
So my question(s)
Should I retrive the data by a single select for the complete data, but I have to remap the data to fill each business-entity
so the problem is: the user_entity is used as owner and creator, but the user-entity don't know, if it is a owner or a creator-instance, so how should the user_entity indentify it's attributes ...
or should I make separated queries to retrive the data (each table in it's own datatable
In this case, has the supplier-entity only a datatable
how can I make updates to my purchaseorder-table
the purchaseorder has only foreign keys for supplier, owner, creator ..
so I need to manually select the relevant data columns from my business-entities for updating the purchaseorder-tabl
maybe there is a generall approach, I would be appreciate about every comment
i hope my questions are not too stupied ..
Rudolf Löw
I need some hints and recommandations about accesing data, and instantiating business-objects with this data
we want to use untyped datasets to retrive data from db and hold this datasets in our business-entities
a small scenario
we have a business-object "purchaseorder" which aggregates some others business-object
eg: orderposition, amount, owner (user_entity), creator (user_entity), supplier ..
So my question(s)
Should I retrive the data by a single select for the complete data, but I have to remap the data to fill each business-entity
so the problem is: the user_entity is used as owner and creator, but the user-entity don't know, if it is a owner or a creator-instance, so how should the user_entity indentify it's attributes ...
or should I make separated queries to retrive the data (each table in it's own datatable
In this case, has the supplier-entity only a datatable
how can I make updates to my purchaseorder-table
the purchaseorder has only foreign keys for supplier, owner, creator ..
so I need to manually select the relevant data columns from my business-entities for updating the purchaseorder-tabl
maybe there is a generall approach, I would be appreciate about every comment
i hope my questions are not too stupied ..
Rudolf Löw