If there are only a few types possible for your generic (e.g. number,
text, date or a certain reference type) you can derive them to a
TextFlexPropertyValue, NumericFelxPropertyValue and so on and map them
with subtype into one table. There you have a column for each type
(text, number, date, foreign key for the reference). This is very fast
to query. But you have to deal with the non-generic types to make it
work. (You CAN map generic types, but i don't know if it works with
subtype.)

On 22 Dez., 01:39, "jeff.jarrell" <[email protected]> wrote:
> Yes, there is a metadata object model. So the 2nd session factory
> comes into play.
>
> Ok, so dynamic-map and custom property accessor are two alternatives.
> I will have to dig in a little more.
>
> thanks to both of you.
> jeff
>
> On Dec 20, 6:43 pm, ggeurts <[email protected]> wrote:
>
> > Jeff,
>
> > It may well be worthwhile writing a custom property accessor that gets/
> > sets property values from your 'FlexProperties' in domain objects.
> > That is a 'stable' NHibernate feature.
> > I presume that your metadata has its own metadata object model which
> > can be loaded with NHibernate as well, probably using a second
> > NHibernate session factory.
>
> > Regards,
> > Gerke.
>
> > On Dec 20, 4:18 pm, "jeff.jarrell" <[email protected]> wrote:
>
> > > I am working on what is to be a heavily data driven application.  One
> > > of the primary objects is a "Property".  I am going to call it a
> > > FlexProperty to avoid confusion with what we normally think of as a
> > > property.
>
> > > A FlexProperty is largely made up of meta-data.  The meta-data comes
> > > from one database.  The "value" can be  specific and stored in a
> > > different database, same database for a default value, or same
> > > database for a 'style' value.  And the target of the value can change,
> > > as when the user provides a value for the specific property and thusly
> > > discarding the default value.
>
> > > So FlexProperty owns an instance of a FlexPropertyValue.  To add
> > > insult to injury, FlexPropertyValue works best if it is a generic
> > > type.
>
> > > Actually, as I read this it seems like I just handle the FlexProperty
> > > and the FlexPropertyValue independently in the Dao.  We are still new
> > > to NH and if this is possible, it would be a complex mapping at that.
>
> > > Any thoughts?
>
> > > Thanks,
> > > jeff- Hide quoted text -
>
> > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to