bringing single localized value of some fields?

4 views
Skip to first unread message

Gauthier Segay

unread,
Aug 9, 2008, 5:47:39 PM8/9/08
to nhusers
I've a mapping where I would like to introduce localized values of
some fields.

I think the db-scheme will be like that:

a table in mainschema that have one or more localized field would have
corresponding table in localization dedicated schema to store
localized fields with simple join on main table pk and language table
pk.

I would like to fetch the data with a simple join over the user
specified language on the localized table and defaulting to
application default language if localization doesn't exist, or bring
null for the localized property if nothing is found.

What do you recommend to do this?

I've thought about interceptors and filters, maybe formula field?

My main concern are:
- keep the mapped entities simple (single localized value needed at
once)
- efficiency (if possible, no lazy loading)

Thanks for your input.

PS: I'm using Castle ActiveRecord (trunk) and NH2, but I'm interrested
on the lowest level solution identification before thinking about that
abstraction.
I recall some discussions about this but can't find where this took
place.

Gustavo Ringel

unread,
Aug 10, 2008, 1:00:58 AM8/10/08
to nhu...@googlegroups.com
i have this post from Ayende in the queue for reading, but still didn't have the time to dig into it and use it in my projects...may be it gives you a start...

http://www.ayende.com/Blog/archive/2006/12/26/7001.aspx

Gauthier Segay

unread,
Aug 10, 2008, 6:07:56 AM8/10/08
to nhusers
Thanks Gustavo, I will search the formula/filter way and come back
with feedback about the issue when I'll actually make it into the app
(not the few next days).

Also I'm wondering how it's act on projection because it seems a
subselect per record would be made, which can be a concern.

On Aug 10, 7:00 am, "Gustavo Ringel" <gustavo.rin...@gmail.com> wrote:
> i have this post from Ayende in the queue for reading, but still didn't have
> the time to dig into it and use it in my projects...may be it gives you a
> start...
>
> http://www.ayende.com/Blog/archive/2006/12/26/7001.aspx
>
Reply all
Reply to author
Forward
0 new messages