[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 wrote: > Hi.. > if i use all-delete-orphans and > > MasterItemList.remove(Masteritem1) >           :session.update(MasterCategory) >  

[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 > I guess I am not following what you are asking. The fetch strategy allows > you to specify how to pull up related entities like

[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+unsubscr.

[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

[nhusers] Re: DDL commands

2009-04-07 Thread Fabio Maulo
2009/4/7 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. Is what I done for a lot of years without NH using migration scripts. That tool allow you to do the

[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 setting in it. We're having similar issues if we try to upgrade to 2.1.0alpha2

[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 > 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 are subscribed

[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 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. > > After

[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 , which can be used to

[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 version

[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 > > Hi. I need to write a lot of DDL commands but I have to do it for each > database vendor that I use. The intention is to updat

[nhusers] DDL commands

2009-04-07 Thread CassioT
Hi. I need to write a lot of DDL commands but I have to do it for each database vendor that I use. The intention is to update the schema but not like SchemaUpdate does. The problem is that SchemaUpdate just update the whole schema but I need a more controlled way to do this. This would help me ma

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

2009-04-07 Thread Arman
i read somewhere that if you set "use_outerjoin" config in settings to "true" , your performance would be better , is it correct ? On Apr 7, 7:17 pm, Tuna Toksoz wrote: > You were in the problem of N+1 > > Tuna Toksöz > Eternal sunshine of the open source mind. > > http://devlicio.us/blogs/tuna

[nhusers] Re: Sequences used by triggers with Oracle

2009-04-07 Thread Fabio Maulo
2009/4/7 BL > > Thank's ! It works well. > Your post was an interesting reading, but not applicable with the > existing system. which one? BTW at least you should say: "but not applicable with MY existing system." -- Fabio Maulo --~--~-~--~~~---~--~~ You rece

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

2009-04-07 Thread Fabio Maulo
2009/4/7 hursting > > 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 Google Groups "nhus

[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 wrote: > > Hello, > > I've had recently a big problem with retrieving rows from

[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: ** (5) fetch (optional - de

[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 > > I've got a private field in a Department class that is a SortedSet, > which is made available to clients as an ImmutableSet, like

[nhusers] Re: making an iesi Set readonly

2009-04-07 Thread Fabio Maulo
IEnumerable 2009/4/7 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 ISet _employees = new > SortedSet(); > >public virtual ISet Employees { >get { retur

[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 ISet _employees = new SortedSet(); public virtual ISet Employees { get { return new ImmutableSet(_employees); } pr

[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 wrote: > > > > On Apr 6, 11:30 pm,

[nhusers] Re: xml alternative to configuration?

2009-04-07 Thread Fabio Maulo
2009/4/7 drozzy > 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: > http://docs.djangoproject.com/en/dev/topics/db/models/#quic

[nhusers] Re: xml alternative to configuration?

2009-04-07 Thread drozzy
On Apr 6, 11:30 pm, Fabio Maulo wrote: > 2009/4/6 drozzy > > > > > 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 property mapped to 2 fields.

[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 wrote: > > 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-nhib

[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
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, Apr

[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 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 wrote: > > > i have this pro

[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 wrote: > I'll follow up on this. I have just noticed an odd thing which might > be

[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 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 is an issue. Go with H

[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 per

[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 wrote: > 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 wit

[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 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 !! > would you ple

[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 because

[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 se

[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: 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 wrote: > If you want change the connection string at run-time I sent you a link to do > it. > 2009/4/7 dagda1 > > > > > > > > > >> > > >

[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 IList oListPersonId = GetAllInterestingPersonId(); ISession oSession = Factory.GetSession(); IQuery oQuery.CreateQuery("Select Person from Person p where p.id in :pListId"); oQuery.AddParameterList("pListId",oListPersonId); oQuery.List

[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 wrote: > http://fabiomaulo.blogspot.com/2009/02/nh210-new-generators.html > > 2009/4/6 BL > > --~--~-~--~~~---~--~~ Y

[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: 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 queryi

[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 5 I've created the JIRA request for the IN thing. Thanks to all ! On 7 avr, 09:40, graphicsxp wrote: > Ok, so it's not possible to do what I want, that's all I

[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 wrote: > Which strategy of nh-session you need ?session-per-request ? > session-per-conversation ? > CpBT ? > > 2009/4/6 hursting > > > > > > > Good afternoon everyone. I have started using NHibernate in one of my > > projects and I guess so fa

[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 clie

[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 wrote: > If what yo

[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 wrote: > Which strategy of nh-session you need ?session-per-request ? > session-per-conversation ? > CpB

[nhusers] 2 basic question

2009-04-07 Thread Arman
hi , as i am working with nhibernate for more than 2 year , but i have 2 simple questions yet, 1- what a proxy is ? what i think is that a proxy is something like watcher that when i want to access that object the proxy understand and fetch that object from database at that time, it maybe useful