Java Mailing List Archive

http://www.gg3721.com/

Home » the NHibernate development list »

[NHibernate-development] Mapping rewrite

Ayende Rahien

2008-06-29

Replies:

Author LoginPost Reply
I am playing with rewriting the mapping at the moment.
Specifically, I am trying to turn this:

<set name="Users"
         access="property"
         table="UsersToUsersGroups"
         lazy="true">
    <cache usage="read-write"
                 region="rhino-security"/>
    <key column="GroupId" />
    <many-to-many class="Rhino.Security.IUser"
                                column="UserId"/>
</set>

To an association to SomeUserClass which is only known at runtime.
There isn't any way to do that that I can see without doing XML manipulation.
I want to be able to do this programatically.
The issue is with the second pass compile creating and then validating information, without giving me any way to handle this. At that point, it gets the value directly from the XML file, without a hook to use to deal with this.

I am thinking about several ways of handling this, but so far haven't found something that I really like.
I am thinking about adding something like Configuration.AfterConfigurationProcessed at Configuration.SecondPassCompile(), just before we start second pass compile on the table mapping.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@(protected)
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
©2008 gg3721.com - Jax Systems, LLC, U.S.A.