2 Replies Latest reply on Mar 13, 2007 11:43 AM by tonylmai

    How to model an entity field of type Money.class?

      Hello all,

      Say I have a customized class called Money. I would like to model an entity bean called Account that has a field called balance of type Money.

      @Entity
      public class Account implements Serializable {
       private Money balance;
      
      
       @Column(nullable=false, columnDefinition="bigint")
       public Money getBalance() {
       return balance;
       }
      ...
      }


      What do I need to do with this Money class to have EntityManager able to map this Money field?

      Thanks in advance for your help.
      -tony