[nhusers] NHibernateUtil.Initialize on inverse side

2011-11-03 Thread HappyNomad
What's the purpose of calling `NHibernateUtil.Initialize` on the inverse side of a many-to-many association? That call is executing SQL that retrieves the contents for the inverse collection. But what are those results for? I don't think NHibernate populates the inverse- side collection, which

Re: [nhusers] Timestamping records in desktop application

2011-11-03 Thread Marios Skounakis
It's true that there are situations where it may be required or at least safer/easier to user the database. On the other hand there are situations where you want a compromise between accuracy and speed and in this case using the delta between the machine time and the database time is a valid

RE: [nhusers] Timestamping records in desktop application

2011-11-03 Thread Pete Appleton
It all depends on use-case; if it doesn't need high-performance/high-concurrency (which seems unlikely as this is a desktop application) then KISS says use a trigger. You don't even *necessarily* need to requery the DB after an update if this is purely audit information which isn't used in the

[nhusers] Re: NHibernate.QueryException : duplicate association path

2011-11-03 Thread Neil McLaughlin
Thanks for the reply. Good suggestion but even after making the suggested change to the joins the query still generates the NHibernate.QueryException : duplicate association path: AttributeValues exception. Just for info I have managed to create an equivalent working query using HQL but would

[nhusers] Re: Bug with nHibernate when using server generated versioning and dynamic-update=true when only child object is modified

2011-11-03 Thread MattO
I had to remove Dynamic Update as the work around... On Nov 1, 10:20 pm, port443 port4...@gmail.com wrote: Hi MattO, I stepped on same thing with 2.1.2 Had to turn off Dynamic-update as a current workaround :( Did you get any further? What is your solution for now? On Oct 7, 4:41 pm, MattO

[nhusers] Re: Is letting the DB manage keys rather than NH bad? and why?

2011-11-03 Thread Davec
Hi Jason, cheers, this all makes sense. about the detached/attached objects. The exception logic you've outlined makes sense too. Back to the main topic though, One of our colleagues raised concerns that identity keys mean you can't use first level cache. I thought however that NH will hit the db

[nhusers] Is taht possible to generate xml mapping from NHibernate.Cfg.Configuration object?

2011-11-03 Thread Alexander Kot
Hello all When I use mapping by code in NH 3.2 I can extract xml mapping from HbmMapping *mapping *= _mapper.CompileMapping before sending it to configuration object But after cfg.AddMapping(mapping); I apply NH.validators to fine tune mapping in cfg and then I want to see final mapping which

[nhusers] Re: Event Listeners and Class Inheritance

2011-11-03 Thread Adrian
Has anyone run into this type of issue? I may need give up on the listeners because they don't seem to support changes to parent classes. Thanks. On Oct 26, 3:05 pm, Adrian adriantwri...@gmail.com wrote: Is there a known limitation around event listeners and inherited classes?  I am using

[nhusers] Re: mapping serveral collections of same type

2011-11-03 Thread Serenarules
What does that have to do with nh mapping? And it doesn't answer my question how can I map several collections of the same type?. In truth, the actual class (not that sample) needs to maintain more than just two collections of the same type. Why does nobody ever just answer the questions asked on

RE: [nhusers] Timestamping records in desktop application

2011-11-03 Thread TheCPUWizard
Pete, 1) I believe there was a post where it was desired to show the date time as part of the UI.if I am mistaken, then KISS/Trigger certainly applies. 2) Who ever said getting an offset from the DB. I am talking about getting the current time from the Server *once* at startup,

Re: [nhusers] table name from NHibernate, or Fluent NHibernate

2011-11-03 Thread brandon law
Is there a way to do this without the SessionFactory or NHibernate config? I only have access to the Fluent NHibernate ClassMap File. On Thu, Nov 3, 2011 at 11:06 AM, Roger Kratz roger.kr...@teleopti.comwrote: var classMetadata = sessionFactory.GetClassMetadata(yourType); var needToCast

[nhusers] PostgreSQL schema update works or not?

2011-11-03 Thread s_tristan
After reading release notes - some of them regarding PostgreSQL. Fnybody have a working solution of upgrading PostgreSQL schema? I also have a Devart PostgreSQL provider, if this provider have a benefits regarding PostgreSQL schema update? Thanks all! -- You received this message because you are

[nhusers] Re: Is letting the DB manage keys rather than NH bad? and why?

2011-11-03 Thread Jason Meckley
1st level cache is not affected by the identity POID. What is lost is the ability to do batched writes. -- You received this message because you are subscribed to the Google Groups nhusers group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/AK_m2kPRaOYJ.

[nhusers] Re: Error reading large numeric type from DB.

2011-11-03 Thread Mirko Klupitz
are you using oracle? i had the same issue with oracle since the .net provider calls GetDecimal and should call GetOracleDecimal b/c a oracledecimal can be larger than the standard .net decimal. On 1 Nov., 14:37, Eli elijahso...@gmail.com wrote: Hey guys, First of all, new member introduction.

[nhusers] Strategies for keeping a db connection away from NHibernate

2011-11-03 Thread Marcelo Zabani
Hi everyone, I have a scenario where I need some very specific SQL to be generated in a background thread (so that my visitors won't have to wait for the work to be done) of a web application. The problem is that I'm afraid that ISessionFactory.GetCurrentSession() may accidentally grab this

[nhusers] NotSupportedException when using Take

2011-11-03 Thread acl123
Hi, I'm upgrading from NHibernate 2.1.2 to 3.2.0. We were using a the Linq provider a lot so I am making converting to the new built-in Linq provider. The following query is throwing a not supported exception: Session.QueryFoo() .Where(x = x.Code == testcode) .Where(x = x.Bar.Id = 7)

Re: [nhusers] Strategies for keeping a db connection away from NHibernate

2011-11-03 Thread Ted Parnefors
What's stopping you from doing a separate mySessionFactory.OpenSession() to start a new session for your background work? With regards to being a single-threaded object; I would assume that you shouldn't access it from multiple threads at the same time as there are no locks in place, so you