‎2009 Dec 06 2:58 PM
Hi guys,
I am thinking about using persistent classes for my CRUD application. However I am unclear about 1 thing... do i have to lock the Db tables before calling the SET_ methods or create_persistent methods ? I went to the SAP reference site Link: [http://help.sap.com/saphelp_nw04/helpdata/en/f5/a3682ebc6911d4b2e80050dadfb92b/content.htm] there they say that they have not implemented the Lock concept yet. Seems like persistent classes are missing a really fundamental thing if they do not lock a Db table before update( or am I misinterpreting something ? ).
So do I explicitly call the ENQUEUE n DEQUEUE FMs to lock the Db table before the SET_ methods? parallel access is possible in my app.
‎2009 Dec 06 11:57 PM
‎2009 Dec 06 11:57 PM
‎2009 Dec 09 5:49 AM
Hi Rich,
1 more question .. if i have multiple Db tables related to 1 logical entity (eg Logical entity is customer and it has multiple Ztables to store customer's data) so I would have to create a persistent class for each of the Ztables correct ? then which of the following approaches is the best
1. Write a wrapper class to represent the Business entity customer and inside that wrapper class call the locking methods and the GET_ & SET_ methods
2. Add the other persistent classes as attributes of the main persistent class( as type ref to so that its corresponding GET_, SET_ methods are auto generated ). eg. IF the are two tables ZCUST, ZCUST_COMP_CODE then we would have 2 persistent classes. Should I add the persisent class of ZCUST_COMP_CODE to ZCUST ?
‎2009 Dec 09 10:36 AM
You have to create a persistence class for each table.
Use option 1. Option 2 couples business meaning into your persistence layer.
matt
‎2009 Dec 10 6:37 AM