Our company is developing an EJB solution for a schema that features auditing fields on every table, including the many-to-many mapping tables. The audit fields are constrained to non-null values, and must include dates as well as the committing user.
The problem that I've encountered is that these fields are not handled with the @ManyToMany annotation model, at least with the current argument set we're using for the annotation. Is there additional annotation or perhaps configuration descriptors that can be used to have EJB3 / Hibernate automatically handle those fields? I've seen examples of Interceptors being used, but discussion of that strategy often leads to business owners looking like they've just stepped on a grave. Having additional, non-null fields on mapping tables can't be a particularly rare case. How can this best be handled through EJB3? One other solution I've found is limiting cascades to REFRESH and DELETE for the @ManyToMany, and creating explicit service layer API methods for association. That means creating an @Entity for each mapping table -- basically extra work. Thanks for your time in advance, Julian Klappenbach Lead Software Developer Ramp Technology Group View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949719#3949719 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949719 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user