from Base b where b.class = Base
2009/3/14 paszczi <[email protected]>
>
>
>
> Hello!
>
> I'm currently trying to solve a problem. I have a class table
> inheritance aka table-er-subclass (one main table + several others
> with additional data). In my app both base object instances and
> extended objects can exist. Now I want to be able to sometimes fetch
> only those base objects and sometimes both types. A simple example
> (both classes are mapped with all of their properties)
>
> public class Base
> {
> public in ID {get; set;}
> public string Something {get; set;}
> }
>
> public class Extended : Base
> {
> public bool NewProp{get; set;}
> }
>
> now running hql query "from Base" would fetch both Base and Extedned
> objects. Is there any way to restrict such behavior to fetch only Base
> objects?
>
> >
>
--
Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---