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 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
