You're right Nexus. We've been debating if the complexity of the solutions is good from the DB standpoint and in brief the response was: no.
So, for the cases where a localization dictionary is needed (some particular cases, where sorting by that column is important and there may be a lot of entities) we'll make a NH <map> to store all the translations. On the common cases where the translation is not so important, we'll keep using our current solution using a IUserType that serializes all the translations to a nvarchar(max) column (moreless like Fabio's article on uNhAddins LocalizablePropertyType http://fabiomaulo.blogspot.com/2009/06/localized-property-with-nhibernate.html). Anyway, thanks to the people that contributed to this topic. @Fabio I tried that solution and as well specifying manually the columns in the mapping (not using FNH). Seems to work, but at the end we decided that exposed above, the solution using IUserType is valid on 99% of the cases and we'll use a map for some critical cases. On 11 Març, 12:10, Nexus <[email protected]> wrote: > As a side note , or even a question that popped up to talking with a > dba on this : > > I understand these sort of patterns if you want to dump your resource > files in a database, but the underlying question is it really that > important and frequent that an application should be able to add an > additional language to his object translations ? If the answer is > yes(more like a resource file style) then you probably should use a > solution like this, but if the answer is no, because for example in a > erp application, you have domain languages (allowed languages) for > instance only french, dutch is allowed, it is not so likely and easy > to add an additional language, because all your objects should be > translated, and the cost on the db side to make joins , the flunky > cache on these solutions(which are nice) isn't really worth it. Just > add name_nl,name_fr to scheme, it can be indexed, sorted, queried in a > db friendly way, in your application it can be projected according to > users language (for instance :)). > > Kind regards -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
