[nhusers] Re: Eager fetching many-to-any (HasManyToAny) collection

2009-04-07 Thread Bartosz Pierzchlewicz
I try this yesterday on current version of NH (release 4174). It seems that it is a parser issue. -- Bartosz Pierzchlewicz On 6 Kwi, 13:50, Bartosz Pierzchlewicz bar...@extranet.one.pl wrote: Fabio, I tested your solution before starting this topic, but I get exception: in expected: re

[nhusers] Re: Illegal attempt to associate a collection with two open sessions

2009-04-07 Thread Arman
i have this problem too, as a matter of fact , i have no clue about what session-per-request and session-per-conversation is !! would you please light me up ? On Apr 6, 10:58 pm, Fabio Maulo fabioma...@gmail.com wrote: Which strategy of nh-session you need ?session-per-request ?

[nhusers] Re: delete generates lots of queries

2009-04-07 Thread graphicsxp
Ok, so it's not possible to do what I want, that's all I wanted to know. I will add the JIRA request. Regarding the batch thing, I was told I can't do it when doing an INSERT because my table has a identity field. Is it true for DELETE as well ? On 6 avr, 22:13, Fabio Maulo

[nhusers] Re: NHibernate and WCF

2009-04-07 Thread graphicsxp
Yes that's for the benefits of using DTO's, but I'm more concerned with the drawbacks :p How do I map my entities to my dto's, and when I send the dto back from the client to the server, how to I recreate an entity with the full data so that nhibernate can detect only the changes made by the

[nhusers] Re: Illegal attempt to associate a collection with two open sessions

2009-04-07 Thread hursting
Session per request On Apr 6, 8:58 pm, Fabio Maulo fabioma...@gmail.com wrote: Which strategy of nh-session you need ?session-per-request ? session-per-conversation ? CpBT ? 2009/4/6 hursting hurst...@gmail.com Good afternoon everyone. I have started using NHibernate in one of my

[nhusers] Re: Sequences used by triggers with Oracle

2009-04-07 Thread BL
Thank's ! It works well. Your post was an interesting reading, but not applicable with the existing system. B.L. On Apr 6, 6:38 pm, Fabio Maulo fabioma...@gmail.com wrote: http://fabiomaulo.blogspot.com/2009/02/nh210-new-generators.html 2009/4/6 BL bj...@hotmail.com

[nhusers] Problem using IList in query parameters.

2009-04-07 Thread similitude2009
Given a list of id's i want to retrieve all my objects. i try IListint oListPersonId = GetAllInterestingPersonId(); ISession oSession = Factory.GetSession(); IQuery oQuery.CreateQuery(Select Person from Person p where p.id in :pListId); oQuery.AddParameterList(pListId,oListPersonId);

[nhusers] Session valid ?

2009-04-07 Thread Kris-I
Hello, Is there a way to know if a session can be use or not after an exception for example. If I check the session with IsDirty and create a new one depending of the result ? Wich is the best way ? Thanks, --~--~-~--~~~---~--~~ You received this message

[nhusers] Re: Illegal attempt to associate a collection with two open sessions

2009-04-07 Thread hursting
Arman, the work arounds are in the post that i put up. Make a copy of the individual object and save that way On Apr 7, 9:22 am, Arman arman.naj...@gmail.com wrote: i have this problem too, as a matter of fact , i have no clue about what session-per-request and session-per-conversation is

[nhusers] Re: Session valid ?

2009-04-07 Thread Dario Quintana
IIRC, you cannot use a session after an exception, you have catch the exception, then you know the session is invalid. On Tue, Apr 7, 2009 at 8:40 AM, Kris-I kris.i@gmail.com wrote: Hello, Is there a way to know if a session can be use or not after an exception for example. If I check

[nhusers] Re: 2 basic question

2009-04-07 Thread James Gregory
1) Correct. Proxying enables lazy loading. 2) SQL can be more performant for really complicated queries, but I wouldn't worry about it until you know there is an issue. Go with HQL or Criteria unless your query does something that would obviously be better suited to plain SQL. Have a look at

[nhusers] Re: Changing the connection string for a session factory

2009-04-07 Thread dagda1
I sent you a link to do it. You did and it works perfectly. Thanks for that. Nhibernate's extensibility is incredible. On Apr 7, 5:59 am, Fabio Maulo fabioma...@gmail.com wrote: If you want change the connection string at run-time I sent you a link to do it. 2009/4/7 dagda1

[nhusers] Re: NHibernate and WCF

2009-04-07 Thread graphicsxp
I'll follow up on this. I have just noticed an odd thing which might be related to what we were talking about. I have an entity Post which holds an IList of CommentPost and in the mapping file it's a bag (it could be set, but that's not the question). When my client get a Post entity from the

[nhusers] Re: Problem using IList in query parameters.

2009-04-07 Thread similitude2009
The error i m getting is {Le flux du protocole RPC (Remote Procedure Call) du flux de données tabulaires (TDS) entrant est incorrect. Trop de paramètres ont été fournis dans cette demande RPC. Le nombre maximal est 2100.} Which translates with something like The array of RPC (Remote Procedure

[nhusers] Re: 2 basic question

2009-04-07 Thread Sidar Ok
Hi Arman, 1 - A proxy is really a word talks for itsself, when you request for an object NH (and some other platforms) gives you not the actual type, but a type inheriting from that. You are not effected because it is transparent for you, and that new type can be used by NH to perform things like

[nhusers] Re: delete generates lots of queries

2009-04-07 Thread graphicsxp
I'll reply to myself I've used NHProfiler (really good tool : ) ) and I can see the DELETE are batched according to the value in property name=adonet.batch_size5/property I've created the JIRA request for the IN thing. Thanks to all ! On 7 avr, 09:40, graphicsxp graphic...@googlemail.com

[nhusers] Re: Many-to-many problem when removing child object

2009-04-07 Thread Vels
Hi.. if i use all-delete-orphans and MasterItemList.remove(Masteritem1) :session.update(MasterCategory) :trans.Commit() its removing from tblCategories and tblCategorisedItems too. i want to remove only from tblCategorisedItems (all-delete-orphans working with one-to-many

[nhusers] Re: 2 basic question

2009-04-07 Thread Arman
thank U , so how can i enable proxy for a relation or for a property ? On Apr 7, 12:16 pm, James Gregory jagregory@gmail.com wrote: 1) Correct. Proxying enables lazy loading. 2) SQL can be more performant for really complicated queries, but I wouldn't worry about it until you know there

[nhusers] Re: NHibernate and WCF

2009-04-07 Thread John Rayner
Metrica.CommentPost[0] is not the name of a type, so I'm afraid that I don't quite follow what you mean. How exactly do you take the supplied Post object and update the database? On Apr 7, 12:19 pm, graphicsxp graphic...@googlemail.com wrote: I'll follow up on this. I have just noticed an odd

[nhusers] Re: Illegal attempt to associate a collection with two open sessions

2009-04-07 Thread Arman
thanks , i want to know what session-per-request and session-per-conversation is ? On Apr 7, 3:00 pm, hursting hurst...@gmail.com wrote: Arman,    the work arounds are in the post that i put up. Make a copy of the individual object and save that way On Apr 7, 9:22 am, Arman

[nhusers] Re: NHibernate and WCF

2009-04-07 Thread Greg Young
Don't .. have the UI track the changes that the user wants to make and send them to the domain as commands. http://martinfowler.com/eaaDev/EventSourcing.html is a good start. but even if you wanted a DTO up/down CRUD model just send back the DTO and map it back to your domain object. On Tue,

[nhusers] Re: NHibernate and WCF

2009-04-07 Thread graphicsxp
John I know it looks weird but that's what I get. I think this post illustrates exactly my issue : http://lunaverse.wordpress.com/2007/05/09/remoting-using-wcf-and-nhibernate/ Unfortunately I haven't been successful in implementing it :( Greg send them to the domain as commands. Do you mean

[nhusers] Re: NHibernate and WCF

2009-04-07 Thread Greg Young
I mean the command messaging pattern. Check out the link I gave. On Tue, Apr 7, 2009 at 10:07 AM, graphicsxp graphic...@googlemail.com wrote: John I know it looks weird but that's what I get. I think this post illustrates exactly my issue :

[nhusers] Re: xml alternative to configuration?

2009-04-07 Thread drozzy
On Apr 6, 11:30 pm, Fabio Maulo fabioma...@gmail.com wrote: 2009/4/6 drozzy dro...@gmail.com Or perhaps is there a way to automatically map a field with a name Foo to a respective field Foo in the database? If the world of ORM would so simple... but in our world you may have 1

[nhusers] Re: xml alternative to configuration?

2009-04-07 Thread Fabio Maulo
2009/4/7 drozzy dro...@gmail.com I don't think db4o is used through nHibernate, is it? I don't think object db is fast enough to switch to it yet. Thank you for all your suggestions. However I was thinking of something more along these lines:

[nhusers] Re: xml alternative to configuration?

2009-04-07 Thread Greg Young
side note: or why not db4o ? I don't think db4o is used through nHibernate, is it? I don't think object db is fast enough to switch to it yet. for OLTP scenarios object databases are generally faster than RDBMS Greg On Tue, Apr 7, 2009 at 10:22 AM, drozzy dro...@gmail.com wrote: On Apr

[nhusers] making an iesi Set readonly

2009-04-07 Thread Berryl Hesh
I've got a private field in a Department class that is a SortedSet, which is made available to clients as an ImmutableSet, like so: protected ISetStaffMember _employees = new SortedSetStaffMember(); public virtual ISetStaffMember Employees { get { return new

[nhusers] Re: making an iesi Set readonly

2009-04-07 Thread Fabio Maulo
IEnumerableStaffMember 2009/4/7 Berryl Hesh ef747...@gmail.com I've got a private field in a Department class that is a SortedSet, which is made available to clients as an ImmutableSet, like so: protected ISetStaffMember _employees = new SortedSetStaffMember(); public

[nhusers] Re: making an iesi Set readonly

2009-04-07 Thread Fabio Maulo
I don't remember if ImmutableSet is only a wrapper to prevent modification.If ImmutableSet is only a wrapper your code are working very well. 2009/4/7 Berryl Hesh ef747...@gmail.com I've got a private field in a Department class that is a SortedSet, which is made available to clients as an

[nhusers] Are you not satisfacted with performance of retrieving data from database? Maybe this will help.

2009-04-07 Thread General
Hello, I've had recently a big problem with retrieving rows from my database. Using CreateCriteria I had to wait about 12s to get 1700 rows. I didn't know where is the problem. After 2 hours I looked in NHibernate documentation again and I saw this: ** many-to-one [...]

[nhusers] Re: Are you not satisfacted with performance of retrieving data from database? Maybe this will help.

2009-04-07 Thread Tuna Toksoz
You were in the problem of N+1 Tuna Toksöz Eternal sunshine of the open source mind. http://devlicio.us/blogs/tuna_toksoz http://tunatoksoz.com http://twitter.com/tehlike On Tue, Apr 7, 2009 at 7:15 PM, General bi...@mavel.pl wrote: Hello, I've had recently a big problem with retrieving

[nhusers] Re: Illegal attempt to associate a collection with two open sessions

2009-04-07 Thread Fabio Maulo
2009/4/7 hursting hurst...@gmail.com Session per request If you have the exception of the title be sure (100%) you are not using session-per-request pattern. -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[nhusers] Re: DDL commands

2009-04-07 Thread Fabio Maulo
Yes it ishttp://sqlmanager.net/en/products/dbcomparer http://sqlmanager.net/en/products/datacomparer http://sqlmanager.net/en/products/datagenerator 2009/4/7 CassioT cass...@gmail.com Hi. I need to write a lot of DDL commands but I have to do it for each database vendor that I use. The

[nhusers] Re: DDL commands

2009-04-07 Thread CassioT
Hi Fabio. These are very interesting tools but I need it inside my application. I will upgrade my app, send it to my clients and all necessary modifications will run. And it's very common to have a lot of clients with different versions. The system will identify the present database model

[nhusers] Re: Are you not satisfacted with performance of retrieving data from database? Maybe this will help.

2009-04-07 Thread James Gregory
It's important to bare in mind most design decisions were made for a reason. There's rarely any blanket rule for speeding up your queries, no magic switch; if there were such a thing, surely it would be the default? You may be interested in Ayende's NHProf http://nhprof.com/, which can be used to

[nhusers] Re: Are you not satisfacted with performance of retrieving data from database? Maybe this will help.

2009-04-07 Thread Paco Wensveen
2 seconds for 1700 rows is still a very long time. On Tue, Apr 7, 2009 at 6:15 PM, General bi...@mavel.pl wrote: Hello, I've had recently a big problem with retrieving rows from my database. Using CreateCriteria I had to wait about 12s to get 1700 rows. I didn't know where is the problem.

[nhusers] Re: Are you not satisfacted with performance of retrieving data from database? Maybe this will help.

2009-04-07 Thread Fabio Maulo
2009/4/7 Paco Wensveen pac...@gmail.com 2 seconds for 1700 rows is still a very long time. You mean 2 second for 1700 objects graphs ? I'm asking because I never see NH returning rows. -- Fabio Maulo --~--~-~--~~~---~--~~ You received this message because you

[nhusers] SecurityException migrating to v2.0.1ga

2009-04-07 Thread Bryan Murphy
We're trying to upgrade from 1.2.0 to 2.0.1ga. I'm testing a web application on IIS 7.0 running in Integrated Pipeline Mode. .NET Trust Level is set to Full Trust in the IIS settings, and the web.config also has the trust level=Full originalUrl= / setting in it. We're having similar issues if

[nhusers] Re: DDL commands

2009-04-07 Thread Fabio Maulo
2009/4/7 CassioT cass...@gmail.com Hi Fabio. These are very interesting tools but I need it inside my application. I will upgrade my app, send it to my clients and all necessary modifications will run. Is what I done for a lot of years without NH using migration scripts. That tool allow

[nhusers] Lazy Loading does not use Transaction ?

2009-04-07 Thread Fernando Zago
Hello there! I've doing a framework using nhibernate, recently i downloaded the NH Profiler, a damn good tool. But, When i'm trying avoid all alerts in the NH Profiler in my framework, when i load an User for example its ok, but when it uses lazy loading to load Friends bag, an alerts shows in

[nhusers] Re: Lazy Loading does not use Transaction ?

2009-04-07 Thread Fernando Zago
sorry for my bad english! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups nhusers group. To post to this group, send email to nhusers@googlegroups.com To unsubscribe from this group, send email to

[nhusers] Re: Loading childs. WCF (Or serialization)

2009-04-07 Thread Fethi Gürcan
Hello James, My question is not point that. But i decided to use DTO's all scnarios like that. Anyway, your answer also useful for me. Thanks 2009/4/4 James Hicks jhicks0...@gmail.com I guess I am not following what you are asking. The fetch strategy allows you to specify how to pull up

[nhusers] Re: Many-to-many problem when removing child object

2009-04-07 Thread Vels
in many to many collection inserting a new child, its deleting all existing rows and re-generating all with new id how to avoid this ? On Apr 7, 5:57 pm, Vels veluga...@gmail.com wrote: Hi.. if i use all-delete-orphans and MasterItemList.remove(Masteritem1)