Loading a entity IDs CSV column as hydrated entities in NHibernate

Posted by James L on Stack Overflow See other posts from Stack Overflow or by James L
Published on 2010-06-08T20:17:36Z Indexed on 2010/06/16 23:32 UTC
Read the original article Hit count: 174

Filed under:

I have a number of database table that looks like this:

EntityId int : 1
Countries1: "1,2,3,4,5"
Countries2: "7,9,10,22"

I would like to have NHibernate load the Country entities identifed as 1,2,3,4,5,7,9 etc. whenever my EntityId is loaded.

The reason for this is that we want to avoid a proliferation of joins, as there are scores of these collections.

© Stack Overflow or respective owner

Related posts about nhibernate