Urgent
Greetings,
I have the following problem;
when using the adapter model with
I have a derived entity class (ICInventory) that inherits ICInventoryEntity (generated by the adapter template), I modified the constructors of the class so that each would call a routine (InitializeObject).
In the this routine I'm initializing the objects' properties with defaults retrieved from the database.
The problem is as follows, on of the objects properties is a collection (ICInventoryStockTotal) that defaults to 10 records (one for each store) when the object is created. When I want ot fetch a collection of the ICInventory object the collection gets populated with objects that have those ten records in addtion to the related records retrieved from the database.
This is a result of the factory of ICInventory calling the constructor with the InitializeObject when retrieving data from the database. Where is the best and recommended area to place this type of initialization code so as to avoid the factory firing unwanted initialization code.
Thanks,
Omar