[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - How to model an entity field of type Money.class?

tonylmai do-not-reply at jboss.com
Mon Mar 12 16:48:50 EDT 2007


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

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

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



More information about the jboss-user mailing list