Hah! I should have asked for your saving code days and days ago. Glad you
figured it out Niklas.
On Wed, Aug 26, 2009 at 7:45 AM, Stuart Childs wrote:
>
> That's how it's supposed to work because NH 2.0 changed the default
> flush mode to Commit (see
>
> http://markmail.org/message/pjqelacrqu5jo
That's how it's supposed to work because NH 2.0 changed the default
flush mode to Commit (see
http://markmail.org/message/pjqelacrqu5jormi#query:+page:1+mid:gte3kefsewskmgfa+state:results).
Previously it was set to Auto, so NHibernate would flush the session
before executing a query, making sure
I actually got it working yesterday, but I haven't had time to write
it here. I didn't create a transaction around my SaveOrUpdate call in
the small test application originally, not sure why. As soon as I
added a transaction everything worked fine.
Is that how it is supposed to work? I guess t
Niklas, I can't see anything wrong with the xml so I suspect your problem
must be to do with how you are adding/saving the entities. Can you show me
the relevant code?
On Fri, Aug 21, 2009 at 11:41 PM, Niklas Wendel wrote:
>
> I have now upgraded and tried with the 1.0 RC and I am still seeing
>
I have now upgraded and tried with the 1.0 RC and I am still seeing
the same behavior which is that the CondExpr_id column is always null
in the database. I have tried both with and without .Inverse(). I
have also changed the model slightly and removed the NotCond class and
replaced it with a boo
I've ran out of ideas based on the code I've seen so far. I am thinking it
might be best if you migrate to using the recently released 1.0 RC version
of FNH as I can give you better assistance when working off that codebase.
If the problem still persists after migrating to 1.0 RC, can you please
ex
Unfortunatley adding an Inverse() made no difference.
/Niklas
On Aug 16, 2:11 pm, Paul Batum wrote:
> Try this:
> m.HasMany(a => a.Exprs)
> .Cascade.All()
> .Inverse();
>
> Also, for your NotExp you want the References() method not HasOne (HasOne is
> for One-to-One mappings which are qui
Try this:
m.HasMany(a => a.Exprs)
.Cascade.All()
.Inverse();
Also, for your NotExp you want the References() method not HasOne (HasOne is
for One-to-One mappings which are quite rare).
On Sun, Aug 16, 2009 at 9:22 PM, Niklas Wendel wrote:
>
> Thank you for the help. I turned off lazy-load
Thank you for the help. I turned off lazy-loading by implementing a
ClassMap where I set up the mappings for the Expr hierarchy of
classes like this:
public ExprMap()
{
Not.LazyLoad();
Id(x => x.Id);
Map(x => x.ExprType);
DiscriminateSubClassesOnColumn("Type")
.SubClass
Yes even this is the expected behavior. Try adding a virtual method to Expr
and override it in CondExpr and call it. You should find that the CondExpr
override gets called.
If you really need to cast, there are a few tricks you can use, some of them
are listed here:
http://stackoverflow.com/questi
Hej!
You understood it correct. Unfortunatley the behavior that you
describe where the ExprProxy gets turned into a CondExpr isn't
happening. Do I have to do something special to make it happen?
Right now I have a line like this in my ExprType case statement:
var condExpr = root.Expr as CondEx
Hi Niklas,
Unless I am misunderstanding, the behavior you describe of a Expr proxy
being loaded is correct. When NHibernate loads your Root object, the
Root.Expr property gets loaded with a Expr proxy. When you then try to use
the Expr object, NH goes to the DB, finds out the type of object (such
12 matches
Mail list logo