It certainly can be done.
As Fabio pointed out, it’s a matter of rebuilding the session factory when you need to modify the mappings ( after you have updated the database schema). I'm doing something very similar. As long as the metadata for your dynamic entities is on hand, you can use FNH to dynamically construct mapping xml (or roll the xml by hand). The real challenge is actually constructing semantically valid mappings from your metadata, as well as linking it in to existing mappings (if there are any relationships required for the dynamic entities to existing entities etc). From: [email protected] [mailto:[email protected]] On Behalf Of Tuna Toksoz Sent: 10 March 2009 20:06 To: [email protected] Subject: [nhusers] Re: Dynamic mappings I don't think it is possible. Tuna Toksöz http://tunatoksoz.com http://turkiyealt.net http://twitter.com/tehlike Typos included to enhance the readers attention! On Tue, Mar 10, 2009 at 9:58 PM, darren <[email protected]> wrote: Entities need to be redefinable as the application runs and revisions audited. When a framework event is posted to update the entity, all referenced objects are rebuilt on the fly and the underlying database schema is altered before persistence happens On Mar 10, 12:43 pm, Tuna Toksoz <[email protected]> wrote: > *All the > entities in my framework are created dynamically at runtime based on a > definition in an xml file -- the database schema and mappings need to* > > This is done only once, is that right? You actually want to let NH know > about your mappings that are created "once" at runtime and doesn't change > any time then. > > Tuna Toksözhttp://tunatoksoz.comhttp://turkiyealt.nethttp://twitter.com/tehlike > > Typos included to enhance the readers attention! > > On Tue, Mar 10, 2009 at 9:40 PM, darren <[email protected]> wrote: > > So you're saying I should look elsewhere? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" 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/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
