openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Smith <>
Subject Re: Custom data types
Date Tue, 04 Dec 2007 18:23:52 GMT
Woohoo - fixed it!!!!

I solved my problem by switching to Toplink11g.
By adding the 2 new annotations TypeConverter and Convert, my 
application now works.

    @TypeConverter( name = "money", dataType = PGobject.class, 
objectType = Money.class    )           

    @Column(name = "price", unique = false, nullable = true, insertable 
= true, updatable = true)
    private Money price;

Now if somebody could help me out by explaining how to do the same thing 
in OpenJPA, that would really make my day.

very best wishes

In case anybody's wondering, it seems that the PostgreSQL JDBC driver 
doesn't support the standard SQLData Interface so one has to use 
PGobject instead.

View raw message