Hibernate mapping -


i have hibernate mapping using "class" tag representing publisher object. 1 of publisher field big description (30k char max). i'm using oracle varchar field have maximum of 4k char, i'm force split description in 8 differents fields (i'm force use varchar field type btw). wan't hide database complexity , have 1 description field in publisher object.

the way found far have "transit" object mapped in hibernate 8 description field manually copy on fly in final publisher object 1 description.

anyone got better way ?

i imagine employ hibernate's custom usertypes "magically" combine columns single value.

this section of of docs discusses how combine 2 columns create custom currency class upon retrieving data table. might started.

http://docs.jboss.org/hibernate/orm/3.6/reference/en-us/html/types.html#types-custom

i'm using load blobs database, , works nicely and, once usertype written , mapped database mappings, code doesn't "know" actual physical types in database.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -