Right, hadn't thought of that. Guess I was a little thrown off by
NHibernate not throwing an Exception.

Turns out I can simply new up the States object or make `public static
IEnumerable<State> GetAll() { return new States(); }` to retrieve the
items.

Thank you. :)
On Feb 10, 12:02 pm, Oskar Berggren <[email protected]> wrote:
> 2012/2/10 Mike <[email protected]>:
>
> > I implemented GenericWellKnownInstanceType from the unoficial
> > NHibernate addins and managed to get my custom user type persisted
> > without any issues. What I'm struggling with is retrieving all data
> > from my new type.
>
> > The query I'm using is as simple as it gets. It returns no errors and
> > no data.
>
> > var states = Session.QueryOver<State>().List();
>
> But your state is not an entity, despite the id.
>
> If the instances are well known, why go to the database to fetch them?
> You already have them in States collection that you have already
> written.
>
> /Oskar

-- 
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