posted 21 years ago
well, probably what we have to do is, compute the derived column and via the session bean (using session facade) call entitybean.setXXX() field just like settting other persistent fields for that computed column we have in the database and so when container calls ejbStore() it automatically stores the computed value in the corresponding column BUT my situation is little different because I have,
- ITEM_COLLECTION entity bean . Dbtable: (ITEM_COLLECTION_ID,ITEMS_INFO1,..., PK(ITEM_COLLECTION_ID))
- ITEM entity bean. Dbtable (ITEM_COLLECTION_ID, ITEM_ID,ITEM_INFO1,..., PK(ITEM_COLLECTION_ID,ITEM_ID))
Now, I want to generate a comma separated list of ITEM_INFO1 for ITEMs in one collection and put it in ITEMS_INFO1 field in ITEM_COLLECTION column you know. So, whenever any ITEM changes I need to somehow have a callback to the corresponding ITEM_COLLECTION entity bean to update its ITEM_INFO1 by running some query again to refresh the entry...
You can consider this ITEM_INFO1 in ITEM as short description for the ITEM and ITEMS_INFO1 in ITEM_COLLECTION as comma separated values to be shown under ITEM_COLLECTION in the display you know...
Hope I am able to explain my situation.
Regards
Maulin