Fabio, I don't quite understand your awnser...

Do you map the classes Sensor and PhysicalInstrument both to the same
table and use the component to be able to query for the correct
sensor?




On 8 okt, 21:09, Fabio Maulo <[email protected]> wrote:
> Which one of the list ?
> Sensor
> {
>  String Name
> IList<PhysicalInstrument> PhyiscalInstruments
> PhysicalInstrument TheFirst{ get{return PhyiscalInstruments[0];}}
>
> }
>
> <component name="TheFirst" class="PhysicalInstrument" access="readonly">
> <property......
> </component>
>
> from Sensor s where s.TheFirst.From > :pMinDate
>
> 2009/10/8 Yves Goeleven <[email protected]>
>
>
>
>
>
>
>
> > Hi,
>
> > I’m in a scenario where I have a denormalized table in the database,
> > where on the other hand in the domain model I’m more in a scenario of
> > a root object with children.
>
> > The object model looks like:
>
> > Sensor
> > {
> >    String Name
> >    …
> >    IList<PhysicalInstrument> PhyiscalInstruments
> > }
>
> > PhyiscalInstrument
> > {
> >     DateTime From
> >     DateTime To
> >     ….
> > }
>
> > The Table model looks like this:
>
> > Sensors
> >     STRING Name
> >     …
> >     DATETIME From
> >     DATETIME To
> >     ….
>
> > The model & table are little bit more complex, but this is the general
> > idea.
>
> > How can I solve this issue in NHibernate ?
> > What should the mapping files look like and how can I query to return
> > a Sensor object ?
>
> > Kind regards,
> > Yves
>
> --
> Fabio Maulo- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
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