-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Internationalized Data in Hibernate
PostPosted: Fri Jun 01, 2007 9:43 am 
Newbie

Joined: Fri Jun 01, 2007 9:09 am
Posts: 4
Nearly 3 years ago Gavin King wrote an article with the same title as above.
There is some code example there, but some key points are missing. At least, that's how I see it.

There is nothing there about mapping the table Label, and nothing about how could a LabelUserType know the user's preferred language instead it is stored with hibernate (in the db) too.

And it seems that in the example that he get all the labels with the actual primary key for all the languages. And cannot see how can he sort out the ones for the actual language.
The 'magic' should be somewhere this part:
Long code = (Long) Hibernate.LONG.nullSafeGet(rs, names, owner);
return Label.getDescrption(code, User.current().getLanguage());

Are theese points as simple as he wrote it in that article? If yes, could somebody "enlighten" me, how can I solve them?

Thanks

PS: I usually generate POJOs with hibernatetool and I haven't seen a generated getter with two arguments as "Label.getDescrption( code, User.current().getLanguage() );" in that article. Could I generate it somehow?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.