java - Table Per Locale -
i have table has next schema : & , mapping java class urlnameentry has 2 values urlname , creatorname. class can straight mapped hibernate , there no issues that.
now problem have different locales deal us, uk, de etc. , planning create separate table each of these locales table_us, table_uk, table_de , there more locales coming in future. how java entity map different table based on locale ?
i thinking in way : create base of operations abstract class urlnameentry , implement usurlnameentry, ukurlnameentry... etc subclasses , utilize table per class strategy solve problem. right approach ?
don't utilize table per locale; introduce sorts of headaches code, , different entries different kinds of things anyway. utilize locale column in single table instead.
java hibernate
No comments:
Post a Comment