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

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


"florian79" wrote : 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 'A' and 'B'.
  | 
  | does it work??

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

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



More information about the jboss-user mailing list