btw... NH does not query the RAM.

On Tue, Nov 16, 2010 at 2:55 PM, Jason Meckley <[email protected]>wrote:

> where is the transaction? NH requires all reads and writes are wrapped
> within a transaction.
>
> On Nov 16, 12:14 pm, Giulio Petrucci <[email protected]>
> wrote:
> > Hi there
> >
> > I have a simple class
> >
> > public class Foo {
> >    public virtual Guid Id { get; set; }
> >    public virtual string Label { get; set; }
> >
> > }
> >
> > and its mapping:
> >
> > <class name="Foo" table="Foo">
> > <id column="Id" name="Id">
> >    <generator class="guid.comb"/>
> > </id>
> > <property name="Label" column="Label"/>
> > </class>
> >
> > and here is the code snippet which is currently keeping me await at night
> :-)
> >
> > ISession s = ...;
> > var x = new Foo() { Label = "X", Id = Guid.NewGuid() };
> > var y = new Foo() { Label = "Y", Id = Guid.NewGuid() };
> > s.Save(x); s.Save(y);
> >
> > var list = s.Query<Foo>().ToList();
> > int c = list.Count;
> >
> > Even if two objects are within the session, the 'list' object's count is
> '0'.
> > I tried the same with a different class, with an Int64 as identifier
> > and everything worked fine.
> > So... what am I missing?
> >
> > Thank you in advance (and sorry for my broken English),
> > Giulio
> >
> > --
>
> --
> 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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>
>


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

Reply via email to