Re: Mapping rewrite
"Fabio Maulo" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Message-ID | <[email protected]> |
2008/6/29 Ayende Rahien <[email protected]>: > 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. many-to-any > > 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. > > I think that I understand what you are doing and I prefer to study all situation around ORM<T> after we have port all mapping features from H3.2.5 (you know, I'm working on mapping.xsd). When we have all other "things" working we can start the work to have : <class name="Parent{T}"> <id name="Id"> <generator class="hilo" /> </id> <set name="Users" table="UsersToUsersGroups"> <key column="GroupId" /> <many-to-many class="T" column="UserId"/> </set> </class> but inside NH, not outside it. -- Fabio Maulo ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/nhibernate-development