[jboss-user] [EJB 3.0] - Re: Database triggers and entity beans
busitech
do-not-reply at jboss.com
Thu Oct 19 19:28:32 EDT 2006
Please let us know if you find a nice way to do this. This limitation of not being able to use the entity manager during callbacks is really a problem!
We are trying to find a clean way to set up simple calculated properties of an object which are assigned a value automatically when it is loaded, such as the sum total of one column, or even a count, from objects on the other side of a OneToMany association.
A concrete example would be to add a YTDSales property to a Salesman object, or an ItemCount property to a Manufacturer object.
There is a @Formula annotation which can contain an SQL string, and the docs state that a subselect can even be performed. However, we would really prefer to stay in Java working with objects!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979522#3979522
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979522
More information about the jboss-user
mailing list