hi all,
suppose I have
Table A: id, name, bID (class A: id, name, bName)
Table B: bID,name,work, address,..... ( no B class)
<class A ....
<property name= "bName" formula = "(Select b.NAME from B where b.bID = bID)" ...
..
Here I load the B.name value for A's bname property.
When I try to save A object, the bID field of the row in A is empty since I did a mapping with a formula tag. That is normal, but I wonder that what can I do to solve that problem.
1- I should map that attribute by using an association, then fine?(I mean to write a B class)
2 - But if I use formula, what can I do to fill the bID field of table A in saving?
thanks..
_________________ -developer
|