[nhusers] Re: NH 2.1.2.4000 + IPreUpdateEventListener + dynamic-insert="true"

2010-01-11 Thread Maxus
Another thing I forgot to say is the IPreUpdateEventListener and the IPreInsertEventListener are being run, I can see them doing work when I save entities and have a break point in them. Just seems any entity value I change in them is ignored. Thanks, M On Jan 12, 11:07 am, Maxus wrote: > Hi Mic

[nhusers] Re: NH 2.1.2.4000 + IPreUpdateEventListener + dynamic-insert="true"

2010-01-11 Thread Maxus
Hi Michael, Thanks for the suggestion, Currently I'm using castle and the nhibernate facility, my configuration is done like so: public class ConfigurationBuilder : IConfigurationBuilder { private readonly IConfigurationBuilder defaultConfigurationBuilder; public Configur

Re: [nhusers] Using Linq in the trunk version

2010-01-11 Thread Mohamed Meligy
I don't fully remember but I don't think so. You know, Session.Load<>() method was introduced to make this kind of FK-PK mentioning more OOP-like. It does not load the object unless you try to get the value of other properties than the ID, not when you use it in LINQ expression tree or get the valu

Re: [nhusers] Removing/Updating items in Bag with unique columns does not remove the items from the database first before updating.

2010-01-11 Thread Maximilian Raditya
On Tue, Jan 12, 2010 at 4:53 AM, Ryan Medlin wrote: >public virtual void AddContentPage(ContentPage contentPage) >{ >contentPage.ContentItem = this; >... >this.ContentPages.Add(contentPage); >} > >public virtual void RemoveConten

Re: [nhusers] Using Linq in the trunk version

2010-01-11 Thread Chris Nicola
I would expect .Where(p => p.Category.Id == id) to work, but I haven't started using the new provider yet. Is there somewhere that the new linq provider is being documented. I would like to get some idea of where it differs from Oren's. "It's documented in the code" is a valid answer if that is

Re: [nhusers] Using Linq in the trunk version

2010-01-11 Thread Tuna Toksoz
.Where (p => p.Category.Id == categoryId) Doesn't this work? Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Mon, Jan 11, 2010 at 10:34 PM, ulu wrote: > Hi, > > What is t

Re: [nhusers] Using Linq in the trunk version

2010-01-11 Thread Mohamed Meligy
.Where (p => p.Category == session.Load( categoryId) Regards, -- Mohamed Meligy Senior Developer, Team Lead Backup (.Net Technologies - TDG - Applications) Injazat Data Systems P.O. Box: 8230 Abu Dhabi, UAE. Phone: +971 2 6992700 Direct: +971 2 4045385 Mobile: +971 50 2623624, +971 55 2017

Re: [nhusers] Removing/Updating items in Bag with unique columns does not remove the items from the database first before updating.

2010-01-11 Thread Diego Mijelshon
Not sure if this will fix your issue, but since you have a PageNumber that needs to be kept consistent, why don't you use a list instead of a bag? Diego On Mon, Jan 11, 2010 at 18:53, Ryan Medlin wrote: > We have a bag of ContentPages where the PageNumber is unique in the > database. > > Wh

[nhusers] Removing/Updating items in Bag with unique columns does not remove the items from the database first before updating.

2010-01-11 Thread Ryan Medlin
We have a bag of ContentPages where the PageNumber is unique in the database. When we remove one item form the list and then renumber the PageNuimbers and try to save it it first tries to update the PageNumbers in the database and we get an error since there is a unique contraint.. What we want i

[nhusers] Re: Strong named NHibernate.Linq

2010-01-11 Thread Vittel
Thats a great Idea, I will try that tomorrow back @ work :) On Jan 11, 2:03 pm, Stuart Booth wrote: > Hi > > Have you  tried signing it withhttp://www.codeplex.com/Signer? > > It's worked for me on other assemblies ;-) > > Stu > > 2010/1/11 Vittel > > > > > I have exactly the same result here. W

[nhusers] Using Linq in the trunk version

2010-01-11 Thread ulu
Hi, What is the recommended way of using the new Linq provider? I'm using the trunk version and trying to do a simple thing: fetch entities by a foreign key. So, I've got the Product class and it has the Category property. How do I fetch all products given a categoryId? .Where (p => p.Category.Id

[nhusers] Re: which generator to use for a new application

2010-01-11 Thread Jason Meckley
HiLo, Sequence HiLo and GUID are all client driven identity generators which allow NH to batch commands. here are some links on the subject: http://www.google.com/search?q=nhibernate+poid On Jan 11, 3:00 pm, fknebels wrote: > I've been using GUID's in my application with Oracle and are working >

[nhusers] Re: which generator to use for a new application

2010-01-11 Thread fknebels
I've been using GUID's in my application with Oracle and are working quite nicely. I'm supporting code that works on both SQL Server and Oracle so only having to define a single type for my table id's is nice. On Jan 11, 2:08 pm, skoub wrote: > Hi everyone, > > Im using Oracle and I have read th

[nhusers] which generator to use for a new application

2010-01-11 Thread skoub
Hi everyone, Im using Oracle and I have read that if i use the sequences for the PK, nh will do the INSERT and then the SELECT to retreive the Id and that is not the best way of doing this. One of the problem would be batch insert or something like that. since that we are building a new applicati

Re: [nhusers] Fwd: Report generation with Nhibernate

2010-01-11 Thread Paulo Quicoli
Hi, here we pass list of object to a crystal reports report... 2010/1/11 Harold Wanyama : > > > -- Forwarded message -- > From: Harold Wanyama > Date: Mon, Jan 11, 2010 at 5:15 PM > Subject: Report generation with Nhibernate > To: nhus...@gmail.com > > > Hi all, Iam a newbie in

Re: [nhusers] IStatelessSession is slower than ISession

2010-01-11 Thread Chris Nicola
It isn't clear exactly what the problem you are having is. I'm assuming the problem you have is having to perform the initial select query on the database with Get? One option would be to perform a single select query before you begin the updates and have all the entities you are updating pre-loa

[nhusers] mapping to an entity with no id

2010-01-11 Thread Gabe Moothart
Hello, In my application I need to be able to query a View that doesn't have a primary key. I didn't write the view and I can't change it. I only need read-only access. When I leave out the Id element, I get this error: (XmlDocument)(3,6): XML validation error: The element 'class' in namespace 'u

Re: [nhusers] Re: Strong named NHibernate.Linq

2010-01-11 Thread Stuart Booth
Hi Have you tried signing it with http://www.codeplex.com/Signer ? It's worked for me on other assemblies ;-) Stu 2010/1/11 Vittel > I have exactly the same result here. When i compile the contrib > sources, i get a 0.0.0.0 version. > It would be great to have the code for the released versi

[nhusers] Fwd: Report generation with Nhibernate

2010-01-11 Thread Harold Wanyama
-- Forwarded message -- From: Harold Wanyama Date: Mon, Jan 11, 2010 at 5:15 PM Subject: Report generation with Nhibernate To: nhus...@gmail.com Hi all, Iam a newbie in Nhibernate and so far so good as I work grasp the nhibernate ideas and workarounds on it. Iam working on a proj

[nhusers] Re: NotIn

2010-01-11 Thread Waqar Sadiq
Ok. Thanks. I will try it. On Jan 11, 9:13 am, Roger Kratz wrote: > Use Expression.Not() (or Restrictions.Not()) around your Expression.In. > > /Roger > > > > -Original Message- > From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of > Waqar Sadiq > Sent: den 11

RE: [nhusers] NotIn

2010-01-11 Thread Roger Kratz
Use Expression.Not() (or Restrictions.Not()) around your Expression.In. /Roger -Original Message- From: nhusers@googlegroups.com [mailto:nhus...@googlegroups.com] On Behalf Of Waqar Sadiq Sent: den 11 januari 2010 16:04 To: nhusers Subject: [nhusers] NotIn Hello, I am looking for an eq

[nhusers] NotIn

2010-01-11 Thread Waqar Sadiq
Hello, I am looking for an equivalent of SQL "not in" in the criteria API but did not see any. I am trying to do opposite of Expression.In. In this case, I have a set of values of a property that I would like to exclude from a query. Can naybody provide some guidance. thanks. Waqar -- You re

RE: [nhusers] NH 2.1.2.4000 + IPreUpdateEventListener + dynamic-insert="true"

2010-01-11 Thread Michael A. Bell
This may just be a thought and may be super simple but did you register the event listeners before you build your sessionfactory? Example: m_Configuration.EventListeners.PreInsertEventListeners = new IPreInsertEventListener[] { new PreInsertEventListener() }; m_Configuration.EventListeners.PreUpd

[nhusers] Re: Cascade issue when deleting an entity in a one-to-one relationship using NHibernate.

2010-01-11 Thread DanV
You just gave yourself the solution. That is exactly what you have to do, set all references to the object you are deleting to null (from otther persistent objects, of course) And that is not really a NH constraint but more a consistency constraint of the code in general. First of all you have to w

[nhusers] IStatelessSession is slower than ISession

2010-01-11 Thread RichB
Hi, I'm persisting several thousand objects in a batch and would like to use IStatelessSession. However, IStatelessSession does not support Load() which slows down the construction of my objects and makes the whole persisting process slow. eg (not the real code!): void AddRegion(string name, int

[nhusers] Re: Strong named NHibernate.Linq

2010-01-11 Thread Vittel
I have exactly the same result here. When i compile the contrib sources, i get a 0.0.0.0 version. It would be great to have the code for the released version from NH-2.1.2 release (or a signed assembly). On 10 Jan., 10:33, DaveW wrote: > The version of NHibernate.Linq.dll in the NHibernate-Linq-2