[nhusers] Regarding Nhibernate.impl.SessionImpl.DoLoad(Type,Object,Object,LockMode,Boolean) Takes lot of CPU time .

2009-10-15 Thread keshav upadhyaya
Hi , In my project i am using Nhibernate to connect to Postgres database . I use YOURKIT profiler to analyze CPU time consumed by my project. Suppose for doing one operation my projects take 41 minute then out of 41 min 35 min are taken by DoLoad() and DoLoadByClass() function . This is very we

[nhusers] Re: Password Hashing In Nhibernate

2009-10-15 Thread Maxus
Thanks for those comments. My issue is knowing when the users changed thier password, The DTO gets sent over the wire to the service, then mapped to the entity, when the entity is saved the service then needs to look at the value in the DB and check if its different to the value on the entity, if

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Mike Nichols
Hm..let me make sure I understand. I am running on NH trunk. What you are saying is that I need to explictly call an NH transaction to have the enlistment happen (default in 2.1)? There isn't a way to have the enlistment take place (config) without explicitly calling session.BeginTransaction() ?

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Fabio Maulo
ups sorry that is the default in NH2.1.x 2009/10/15 Fabio Maulo > NH's transaction mean that you can inject ITransactionFactory working with > AmbientTransaction instead AdoTransaction.The conf property is: > transaction.factory_class > The impl is AdoNetWithDistrubtedTransactionFactory > >

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Fabio Maulo
NH's transaction mean that you can inject ITransactionFactory working with AmbientTransaction instead AdoTransaction.The conf property is: transaction.factory_class The impl is AdoNetWithDistrubtedTransactionFactory 2009/10/15 Mike Nichols > > Fabio, I saw bits of that discussion on my google wa

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Mike Nichols
Fabio, I saw bits of that discussion on my google wandering. I was relying on ambient transactions (no nh transaction) and that worked fine until this issue where I am trying to write to another database (ie another SessionFactory) inside of a single transaction so that if there are problems every

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Fabio Maulo
This is an annoying matter in our dev-list. In some moment, for various reasons since NH 2.0 (cache, lazy-extra and so on), we said: each persistent action should be involved in a NH's transaction. For me that's all: each persistent action should be involved in a NH's transaction. So [Transaction

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Angel Java Lopez
Hi people! Mike, I dont't understand if you are trying to test the rollback of distributed transaction, or the behaviour of ForceEscalationToDistributedTx. Just curious, what is the result if you remove these two lines?: new ForceEscalationToDistributedTx(true); tx.Complete(); Anoth

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Mike Nichols
Hi Fabio That does work and I thank you for your guidance. I read this in ch 10 on transactions:"If the connection is enlisted with a distributed transaction, operations performed by the ISession are atomically part of the wider distributed transaction." so I thought the session would enlist itse

[nhusers] Re: Execute Stored procedure before and after each batch of queries

2009-10-15 Thread Fabio Maulo
YesIBatcherFactory and IBatcher (or AbstractBatcher) Setable through configuration (property adonet.factory_class ) 2009/10/15 birchoff > > Is there a way to make nhibernate execute a specific stored procedure > at the beginning of each batch query? > > > > -- Fabio Maulo --~--~-~--~

[nhusers] Re: ReadOnlyCollection & ReadOnlyObservableCollection - are these supported

2009-10-15 Thread Fabio Maulo
- concrete classes can't be proxy- ReadOnlyCollection can't be populated from DB. btw you can implements your IUserCollectionType if you need some special behaviour. 2009/10/15 Ollie Riches > > Does NH support using ReadOnlyObservableCollection<> & > ReadOnlyCollection<> collection as the Prope

[nhusers] Re: DTC and multiple session factories/sessions

2009-10-15 Thread Fabio Maulo
What happen if you begin a NH's transaction (repeat a transaction of NH) after open each session ? Try to execute each save inside the corresponding NH's transaction and let me know what happen. 2009/10/15 Mike Nichols > > This test fails. Within a single transaction, there may be multiple > ses

[nhusers] DTC and multiple session factories/sessions

2009-10-15 Thread Mike Nichols
This test fails. Within a single transaction, there may be multiple sessions trying to persist to different databases but I am not sure this is possible. I lifted the ForceEscalationToDistributedTx from NH DTC tests and it enlists itself to rollback the transaction. Is what I am trying to do here

[nhusers] Re: ReadOnlyCollection & ReadOnlyObservableCollection - are these supported

2009-10-15 Thread José F . Romaniello
BTW; check this example: http://code.google.com/p/unhaddins/source/browse/trunk/Examples/uNHAddins.Examples.SessionManagement/SessionManagement.Domain/PurchaseOrder.cs

[nhusers] Re: ReadOnlyCollection & ReadOnlyObservableCollection - are these supported

2009-10-15 Thread José F . Romaniello
If the collection is readonly, you could do something like this: public class SomeClass{ private IList< SomeChild > myColl; public ReadOnlyCollection MyColl { get {return new ReadOnlyCollection(myColl); } } } And use the access="field" Otherwise show me your class and I will help you.

[nhusers] ReadOnlyCollection & ReadOnlyObservableCollection - are these supported

2009-10-15 Thread Ollie Riches
Does NH support using ReadOnlyObservableCollection<> & ReadOnlyCollection<> collection as the Property for collection instead of IList<> Thanks in advance Ollie --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nh

[nhusers] Re: nhibernate - 2 factories / 2 models / 2 databases

2009-10-15 Thread Fabio Maulo
btw is not a NH problem. 2009/10/15 wa...@codingvista.com > > sorry! > > that was a coipy/paste error - in the app they are different con > strings... > > On Oct 15, 4:03 pm, Valeriu Caraulean wrote: > > As I suggested in other group, you have specified same database for > > both factories. > >

[nhusers] Re: NHValidator Not-Null does not validate

2009-10-15 Thread Fabio Maulo
what ? 2009/10/15 Fernando Sosa Balaguer > > Anybody seen this? > A not-null constraint produces a PropertyValueException ("not-null > property references a null or transient value"} when listeners are > configured. Happens in 1.2.0 beta2 > > It must throw an InvalidStateException, doesn't it? >

[nhusers] Execute Stored procedure before and after each batch of queries

2009-10-15 Thread birchoff
Is there a way to make nhibernate execute a specific stored procedure at the beginning of each batch query? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhuser

[nhusers] InvalidCastException when using custom OracleConnectionProvider

2009-10-15 Thread Eric J. Peters
I have a situation where I need to manage NHibernate connections/ transaction so that I can share transactions between NHibernate and our legacy data access methods. What I have done is created a custom OraclConnectionProvider that returns a wrapped OracleConnection. The problem is, when I use

[nhusers] NHValidator Not-Null does not validate

2009-10-15 Thread Fernando Sosa Balaguer
Anybody seen this? A not-null constraint produces a PropertyValueException ("not-null property references a null or transient value"} when listeners are configured. Happens in 1.2.0 beta2 It must throw an InvalidStateException, doesn't it? You can test it in NHibernate.Validator.Demo.NHI setting

[nhusers] Re: nhibernate - 2 factories / 2 models / 2 databases

2009-10-15 Thread wa...@codingvista.com
sorry! that was a coipy/paste error - in the app they are different con strings... On Oct 15, 4:03 pm, Valeriu Caraulean wrote: > As I suggested in other group, you have specified same database for > both factories. > > On Thu, Oct 15, 2009 at 3:26 PM, Wayne Douglas > > wrote: > > > hmm > > >

[nhusers] Re: Trial for spam

2009-10-15 Thread José F . Romaniello
Please, mark the first message (and others mail from my account) as a SPAM.Gmail will automatically mark in the future. Thank you Tuna. 2009/10/15 Tuna Toksoz > Sorry for such messsage, was trying to figure out what is going on, it > turned out to be what I had in mind: > Email protocol is no

[nhusers] Re: Incorrect Paging in SQL Server 2005

2009-10-15 Thread Ivan Popok
OK, I've found that it's been fixed in 2.1.0, but maybe somebody can help to handle that issue with 2.0.1? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to nhusers@

[nhusers] Re: nhibernate - 2 factories / 2 models / 2 databases

2009-10-15 Thread Valeriu Caraulean
As I suggested in other group, you have specified same database for both factories. On Thu, Oct 15, 2009 at 3:26 PM, Wayne Douglas wrote: > > hmm > > here's my config can you see if there's anything blatantly wrong? > > ideally i'd like to have all the different reporting concerns come > from th

[nhusers] Re: Trial for spam

2009-10-15 Thread Tuna Toksoz
Sorry for such messsage, was trying to figure out what is going on, it turned out to be what I had in mind: Email protocol is not working well, you can write virtually anything in the "TO" section, which is why all messages are let through. Tuna Toksöz Eternal sunshine of the open source mind. ht

[nhusers] Trial for spam

2009-10-15 Thread Tuna Toksoz
--- Message ID= 8740 --- This email was sent byAnonyMailer.Net v2.2 for free... Remove this advertisement for just $12/year -- Just checking. --~--~-~--

[nhusers] Re: Querying a map

2009-10-15 Thread BennyM
So, to answer my own question. No there's not, yet. http://nhjira.koah.net/browse/NH-1795 On Oct 1, 2:58 pm, BennyM wrote: > Considering this example: > >         public class User >         { >             public virtual Guid Id { get; set; } >             public virtual IDictionary > Favorite

[nhusers] Incorrect Paging in SQL Server 2005

2009-10-15 Thread Ivan
Hi all! I'm using NH 2.0.1 GA and don't really know whether it was fixed in the latest release, but today I've found the problem. NH generates incorrect SQL when paging is used on SQL Server 2005 Express - something like (code copied from NH Profiler): [code] SELECT TOP 15 Id6_1_,

[nhusers] HQL and UNION ALL

2009-10-15 Thread Jimit Ndiaye
Hi all, I've been doing a bit of googling but I can't seem to find a definitive answer on whether or not HQL currently supports the UNION ALL keyword. I've found a few dated articles saying everything from not at all to yes if underlying dialect supports it. The scenario I'd like to put toge

[nhusers] Re: Ideas for wrapping NH-Linq queries with common DB retry logic

2009-10-15 Thread Graham Bunce
Ok, worked it out myself, with .NET 3.5 use anonymous methods. e.g. ISerial result = QueryProcessor.Linq(() => Session.Linq ().SingleOrDefault(s => s.SerialId == serialIdentifier)); and public static T Linq(Func executeStatement) { int retry = 0; T result = default(T); d

[nhusers] Re: nhibernate - 2 factories / 2 models / 2 databases

2009-10-15 Thread Wayne Douglas
hmm here's my config can you see if there's anything blatantly wrong? ideally i'd like to have all the different reporting concerns come from their respective application databases and my reporting app to belong to itself. nice and pluggable :) t

[nhusers] Re: nhibernate - 2 factories / 2 models / 2 databases

2009-10-15 Thread Fabio Maulo
I don't think the problem is in NH.I'm using multi DB app without problems (without Castle NHF) 2009/10/15 Wayne Douglas > > Hi > > I have asked this on the castle list as i'm using the nh facility but > it just dawned on me to ask it here too :) > > sorry for the cross posting. > > I'm using th

[nhusers] Help with legacy database mapping

2009-10-15 Thread Simon
Hi all, I don't think this is possible in NH, but I'm hopeful someone will be able to tell me I'm wrong! I have a database structure like this: Table Person { ID (pk), Name, AddressTypeID } Table AddressTypes { ID (pk), AddressTypeID, AddressID, Type (varchar) } Table Address { AddressID (pk),

[nhusers] Re: how to deal with a graph of proxies

2009-10-15 Thread Raul Carlomagno
yes, this is right in the case where i load my objects from the db directly with a criterya or hql, but in my case, the objects come as proxies, they were loaded in another session, so i cannot make a query to get them, i reattach them to a session and the proxies are loaded as they are needed but

[nhusers] nhibernate - 2 factories / 2 models / 2 databases

2009-10-15 Thread Wayne Douglas
Hi I have asked this on the castle list as i'm using the nh facility but it just dawned on me to ask it here too :) sorry for the cross posting. I'm using the nh facility to configure the following setup: i have 1 database which stores generic report configuration. and another which stores the

[nhusers] Re: how to deal with a graph of proxies

2009-10-15 Thread J M
What you want is eager and/or join fetching. http://nhforge.org/wikis/howtonh/lazy-loading-eager-loading.aspx http://ayende.com/Blog/archive/2007/03/17/Performance-Multiply-Collections-Fetch-With-NHibernate.aspx Instead of just grabbing the PERSON object from the session, make a specific HQL quer

[nhusers] Re: Interface/subclass mapping

2009-10-15 Thread Meidan
You can use a default discriminator to say that the subclass implements that interface. On Oct 14, 3:43 pm, HJ wrote: > If it makes a difference, I only ever need to retrieve the entities as > their basetype. So regardless of which class is passed to NHibernate > the interface properties should

[nhusers] Re: problems with sessions on different threads

2009-10-15 Thread Francisco A. Lozano
Try to completely disable your own log4net logging and see if nhprof still throws these alarms. Francisco A. Lozano On Thu, Oct 15, 2009 at 08:33, Artur Dorochowicz wrote: > > I have exactly the same problem, although my app is still early in > production and I didn't (yet) see my 'server cra