HI there, I'm working on a multilingual database schema which contains a table for language neutral field (let's say person table) and an associated table with language field (let's say person_language table) containing translated rows for each language. The person table is something like person(id,language_neutral_field1, language_neutral_field2, ...) while the person_language table is something like person_language(person_id,language_id,language_field1, language_field2, ...). Now, in my application a have a Person class whose fields need to be mapped to the database. The language neutral field should be mapped to the person table, while the language fields should be mapped to the person_language table depending on the choosen language. I browsed the net and I found quite few solutions for i18n on Hibernate, but none working on a database like the one I just described and/or in a class transparent way. What I need is basically the possibility to map language neutral field and language field of the same class to different tables in a dynamic fashion (depending on the choosen language). Is there anything I can do with custom user types and/or interceptors and/or with any other solutions? Thanks a lot
Giulio
|