[jboss-user] [JBoss AOP] - persiste a mixin class

florian79 do-not-reply at jboss.com
Mon Feb 12 10:01:07 EST 2007


Hallo!

The mixin tag allows the attribute transient="false". So is it possible to persiste the mixin class by ejb3/hibernate?

Example in jBOSS AS (container managed):

  | ClassA extends BasicClassA
  | {
  |      public String getA(){..}
  | }
  | ClassB extends BasicClassB
  | {
  |      public String getB(){..}
  | 
  | }
  | interface InterfaceWithMethodsOFClassB
  | {
  |      public String getB();
  | }
  | 
All classes are annotiated by @Entity. Means all properties are mapped to the DB
Mixin:

  | <introduction class="ClassA">
  |   	<mixin transient="false">
  | 	<interfaces>InterfaceWithMethodsOFClassB</interfaces>
  | 	  	<class>ClassB</class>
  | 	  	<construction>new ClassB(this)</construction>
  |   	</mixin>
  |   </introduction>
  | 

The DB table of classA should have the collumns 'MethodA' and 'MethodB'.

does it work??

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015075#4015075

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015075



More information about the jboss-user mailing list