[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ews.eclipse.technology.aspectj] Annotations on inter-type fields?

I am trying to extend a hibernate persisted class with some new fields to be persisted. The @DeclareParents works great:

   @DeclareParents(
           value="org.opentrader.platform.samples.persistentaspect.Position",
           defaultImpl=PositionReservedQuantityImpl.class)
   private PositionReservedQuantity positionReservedQuantity;

But the field that is part of the implementation is not bringing along its annotation, for which hibernate is complaining:

   public static class PositionReservedQuantityImpl implements PositionReservedQuantity {

@Column(name="reservedQuantity")
private int reservedQuantity;
public int getReservedQuantity() {
return reservedQuantity;
}


       public void setReservedQuantity(int reservedQuantity) {
           this.reservedQuantity = reservedQuantity;
       }
   }

Should this work? Or do I need to do a @DeclareAnnotation as well? Or is this only going to work with the .aj syntax:

   @Column("reservedQuantity")
   private int Position.reservedQuantity = 0;

Any insight would be much appreciated!

-barry