I'm afraid there isn't a way to mix xml and fluent mappings at the level you
are hoping for. You will need to map that class using xml or start working
on a patch for ternary support :)

On Sat, Jul 25, 2009 at 6:22 PM, Fost andy <[email protected]> wrote:

>
> Howdy folks,
>
> I'm wondering if there is a way to inline raw xml code into a fluent
> mapping? I know fluent has hybrid mapping capabilities but as I
> understand it this is only on the per-class granularity, and I guess I
> am looking for per property granularity.
>
> I have a class with a number of fields, all of which but one can be
> mapped nicely by fluent nhibernate. The exception is a Dictionary that
> represents a ternary association (I'm assuming it can't based on posts
> like this
> http://stackoverflow.com/questions/970180/fluent-nhibernate-dictionary-mapping-with-class-key
> - the other reason for this post is to confirm this is the case).
>
> Thanks to this post (
> http://noahblu.wordpress.com/2009/01/14/nhibernate-generic-dictionary-mapping/
> ) I have the hbm.xml to correspond to this mapping, but was just
> wondering if there was a way to just put this segment into my existing
> fluent mapping, instead of having to manually create the entire
> hbm.xml mapping manually?
>
> Basically, I want to have it combine code like:
>
> <map name=”DesertRatings” table=”PeopleDesertRatings”>
> <key column=”PersonId” />
> <index-many-to-many class=”Desert” column=”DesertId” />
> <element column=”Rating” type=”MyNamespace.Rating” not-null=”true” />
> </map>
>
> with a fluent mapping to produce the appropriate hbm.xml (I wouldn't
> expect it to undergo the same verification process).
>
> As I write this I realise that I could do this by manually exporting
> the files and then editing them to insert the code and reloading, but
> perhaps there is an easier way?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" 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/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to