openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roy Smith <roy.sm...@primetext.com>
Subject Custom data types
Date Sun, 02 Dec 2007 22:47:31 GMT
I've got a custom (PostgreSQL) data type

*create* type couk_cleverthinking_gwappo_db_Money *as* (local_value *numeric*(11,2),mnemonic
*char*(3));

and a corresponding Class definition.

public class Money extends PGobject implements SQLData, Serializable, Cloneable{
public BigDecimal localValue;
public String currencyMnemonic;
.
.
etc
.
.
}


After a bit of effort I got this working in JDBC(the key being PGConnection.addType()).

Please could somebody give me some pointers on how to go about incorporating this custom type/mapping
into OpenJPA.
Eg. is this a Value Handler or Class Strategy problem (or am I barking up the wrong tree altogether)?


very best wishes
Roy






Mime
View raw message