hibernate - Mapping JPA for DB2 Spatial -
i working on application based on websphere application server 7 , db2 spatial extender , i'd use jpa data access layer.
i've set simple table in database testing purpose:
jmtest (id integer | position db2gse.st_point)
the challenge map position column (db2gse.st_point) field of jpa entity
the working solution found far use hibernate jpa implementation can make use of @columntransformer annotation:
@entity @namedquery(name = "getallrecords", query = "select j jmtest j") public class jmtest implements serializable { private static final long serialversionuid = 1l; @id @generatedvalue(strategy=generationtype.identity) private int id; @columntransformer(read="db2gse.st_astext(position)",write="db2gse.st_pointfromtext(?,1003)") private string position;
since using websphere 7, comes jpa 1.0 , ibm or openjpa implementation. unfortunately, afraid have stick these (no possibility use jpa 2.0 neither use alternate jpa provider)
i not find equivalent of @columntransformer in ibm or openjpa implementations. if exists, please explain me should use?
if not, please give me advice on how can map db2spatial column jpa entity field using ibm/openjpa implementation?
many in advance.
take @ @factory
, @externalizer
annotations exist in openjpa.
Comments
Post a Comment