[nhusers] Re: will Linq provider in NH 3.0 include the Future queries?

2010-01-30 Thread Vladan Strigo
I don't think so?! I could be wrong though. Futures in a way that you can write couple of seperate queries, mark them as future and have the engine execute them all with something like multiplecriteria in one batch when you call the result of the first one? Vladan On 29 sij, 10:27, Craig van

[nhusers] Re: JavascriptSerializer and NHibernate proxy's

2010-01-30 Thread Vladan Strigo
Np, although I've found a problem with it. It doesn't serialize correctly (I get wrong data in wrong columns in JSON). As soon as I find a working solution it will be posted here...thanks for reminding me Fabio! :) allan.ritchie...would it be possible to see your solution? maybe it will save

[nhusers] Re: Issue with a subquery (possible bug in NH ?)

2010-01-30 Thread graphicsxp
Anyone ? I've very puzzled regarding the 'this_' part of the query generated by NH... On 27 jan, 16:04, graphicsxp graphic...@googlemail.com wrote: Hi, I'm doing a subquery using a formula in one of my properties, which results in an exception : Incorrect syntax near the keyword 'TOP'.

Re: [nhusers] Re: Issue with a subquery (possible bug in NH ?)

2010-01-30 Thread Fabio Maulo
you are using an old version of NH or you have disabled the autoimport of keywords. You can inherit from the dialect and add the keyword TOP. 2010/1/30 graphicsxp graphic...@googlemail.com Anyone ? I've very puzzled regarding the 'this_' part of the query generated by NH... On 27 jan, 16:04,

Re: [nhusers] Re: IQuery.List() returning entities in wrong order

2010-01-30 Thread Fabio Maulo
For sure what you are defining 'bug' is not the order you are seeing entities in the result IListIListobject. The new parser may have some problem when the alias has the same name of a property because the new parser allow to specify a property without the alias, but for sure the problem is not

[nhusers] Correlated Subquery on Multiple Properties

2010-01-30 Thread jwdavidson
I have been try to get a correleted subquery working for day now without success.. I want to use the ICriteria API if possible. The query in SQL (for Oracle) that works is: Select ca.* From CA_Detail ca Inner Join (Select max_ca.ca_id, max(max_ca.revision_num) as max_rev From

Re: [nhusers] Re: IQuery.List() returning entities in wrong order

2010-01-30 Thread Oskar Berggren
Bug or not I guess would depend on if this is a change compared to previous _specified_ behaviour, or if your queries are underspecified and rely on undefined behavior which simply have happened to give the result you expect before? /Oskar 2010/1/29 Nels Olsen nels.ol...@sbcglobal.net:

Re: [nhusers] Re: will Linq provider in NH 3.0 include the Future queries?

2010-01-30 Thread Mohamed Meligy
@Vladan I think you are right.IQueryable (LINQ) is about single query yet to be executed, while Future is about multiple (probably independent) queries. In NH 3.0, there are two new query APIs, the LINQ one, and the IQueryOver one, which is sort of similar to criteria (I think), but is strongly

Re: [nhusers] Re: IQuery.List() returning entities in wrong order

2010-01-30 Thread Fabio Maulo
Yes Oscar... _specified_ is the key word here... we can't ensure the order of each element if the order is not specified (for this reason I'm saying that is not the bug). 2010/1/30 Oskar Berggren oskar.bergg...@gmail.com Bug or not I guess would depend on if this is a change compared to

Re: [nhusers] Re: will Linq provider in NH 3.0 include the Future queries?

2010-01-30 Thread Paco Wensveen
It doesn't sound difficult to implement Furture and fetch strategies in the new linq provider. We just have to extend IQueryable to INHibernateQueryable with some extra methods? On Sat, Jan 30, 2010 at 3:37 PM, Mohamed Meligy eng.mel...@gmail.comwrote: @Vladan I think you are right.IQueryable

Re: [nhusers] Re: will Linq provider in NH 3.0 include the Future queries?

2010-01-30 Thread Mohamed Meligy
I think the trend is not to extend IQueryable much (unlike the older LINQ provider that had the Expand() function), and to invest in IQueryOver instead. I cannot confirm whether this is really the case though as all I do is I read the public APIs after building NH from newer revision.Personally,

Re: [nhusers] Logging to stdout

2010-01-30 Thread Diego Mijelshon
Um... by not setting show_sql? Diego On Thu, Jan 28, 2010 at 07:54, eti etis...@gmail.com wrote: Hi, It seems that when show_sql is set to true in the configuration NHibernate also logs the sql queries to stdout. Looking at the code i see that there is a property called LogToStdout but

[nhusers] Re: Castle for NHibernate 2.1??

2010-01-30 Thread Jason Meckley
Rickers, there is the possibility of version conflicts depending on where you pull the binaries of NH and Castle. but I think those 2 versions are compatible. Also version conflicts usually appear as compilation errors warnings. Assuming the problem isn't version conflicts the next step is

Re: [nhusers] Nhibernate stored procedures output parameters

2010-01-30 Thread Diego Mijelshon
Yes. And for good reasons. Diego On Thu, Jan 28, 2010 at 06:46, Asier asierrollogr...@gmail.com wrote: Hello Is true that Nhibernate doesn’t support stored procedures output parameters? Thanks. -- You received this message because you are subscribed to the Google Groups nhusers

Re: [nhusers] Re: will Linq provider in NH 3.0 include the Future queries?

2010-01-30 Thread Fabio Maulo
Probably we will include some persistence-oriented extensions to our Linq-provider... probably, the word, will be not Expand but JoinFetch or Fetch. btw have a look to QueryOver if you want find Linq-like syntax and all features available in ICriteria together. 2010/1/30 Mohamed Meligy

Re: [nhusers] Re: will Linq provider in NH 3.0 include the Future queries?

2010-01-30 Thread Paco Wensveen
A disadvantage of the queryover api is that it does not support all functions in the linq api. That makes it useful to extend the linq api. On Sat, Jan 30, 2010 at 5:02 PM, Mohamed Meligy eng.mel...@gmail.comwrote: I think the trend is not to extend IQueryable much (unlike the older LINQ

Re: [nhusers] Table Per Subclass Inheritance Mapping and the New Keyword

2010-01-30 Thread Diego Mijelshon
The use of the new keyword is usually an indicator of bad design (you have two elements in the same hierarchy, with the same name but different meanings). Plus, you are trying to add additional constraints on inheritance. Diego On Thu, Jan 28, 2010 at 16:33, roend roen...@gmail.com wrote:

[nhusers] Refreshing entity throws Exception

2010-01-30 Thread Maximilian Csuk
Hi there, I am trying to use Session.Refresh() to rollback changes made to an entity in memory. The entity has a lazy loaded one-to-many association/ collection to other entities (cascade is all-delete-orphans). When I add an entity to the collection and call Refresh(), it gives me this

Re: [nhusers] Table Per Subclass Inheritance Mapping and the New Keyword

2010-01-30 Thread Fabio Maulo
I'm sorry... a simple 'override' instead a 'new' would be not enough ? btw I hope this problem is not for an auto-property 2010/1/28 roend roen...@gmail.com I have an inheritance structure that looks something like this: public class BaseClass { public virtual

Re: [nhusers] Refreshing entity throws Exception

2010-01-30 Thread Fabio Maulo
I think we having a opened issue about this matter. 2010/1/30 Maximilian Csuk maximilian.c...@gmx.at Hi there, I am trying to use Session.Refresh() to rollback changes made to an entity in memory. The entity has a lazy loaded one-to-many association/ collection to other entities (cascade is

Re: [nhusers] Table Per Subclass Inheritance Mapping and the New Keyword

2010-01-30 Thread Diego Mijelshon
He can't use override because he's trying to restrict the type of the children... Diego On Sat, Jan 30, 2010 at 13:49, Fabio Maulo fabioma...@gmail.com wrote: I'm sorry... a simple 'override' instead a 'new' would be not enough ? btw I hope this problem is not for an auto-property

Re: [nhusers] Table Per Subclass Inheritance Mapping and the New Keyword

2010-01-30 Thread Fabio Maulo
Ups if so a generic class would be better BaseClassT public virtual IColllectionT Collection { get;set; } ChildClass: BaseClassChildClassCollection then you can map the collection to internal field and use Linq OfTypeT to return the expected strongly-typed enumerable. Obviously there are

[nhusers] Criteria API for deletion / updates

2010-01-30 Thread Armin Landscheidt
Is there a Createria API for doing deletions and updates? Something like: session.CreateCriteriaMyClass() .Add(Restrictions.Eq(Name, theName)) .ExecuteDelete() session.CreateCriteriaMyClass() .Add(Restrictions.Eq(Name, theName)) .SetItemForUpdate(Name, newName) .ExecuteUpdate() Sometimes it

Re: [nhusers] Criteria API for deletion / updates

2010-01-30 Thread Fabio Maulo
No 2010/1/30 Armin Landscheidt saij...@googlemail.com Is there a Createria API for doing deletions and updates? Something like: session.CreateCriteriaMyClass() .Add(Restrictions.Eq(Name, theName)) .ExecuteDelete() session.CreateCriteriaMyClass() .Add(Restrictions.Eq(Name, theName))

[nhusers] Two classes with the same name but different namspaces

2010-01-30 Thread Armin Landscheidt
Hallo, I have two classes with the same name but different namespaces. If I want two add both to the NHiberante configuration the configuration throws an exception because of duplicated mappings. Is this a bug? If not I think this would be a nice feature. -- You received this message because

Re: [nhusers] Two classes with the same name but different namspaces

2010-01-30 Thread Fabio Maulo
autoimport=false To allow you to easy write an HQL NH is registering the even name of the class. For example: from Something With autoimport=false you must use the full name of the class in your query from YourCompany.YourProduct.Something 2010/1/30 Armin Landscheidt saij...@googlemail.com

[nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Armin Landscheidt
I saw several threads about deleting an object without loading it or using proxy objects. I think to do this with the Criteria API would be very elegant. On 30 Jan., 19:05, Fabio Maulo fabioma...@gmail.com wrote: No 2010/1/30 Armin Landscheidt saij...@googlemail.com Is there a Createria

[nhusers] Re: Two classes with the same name but different namspaces

2010-01-30 Thread Armin Landscheidt
Ah ok thanks for the answer. Now I understand this behaviour which was very strange when I got the Exception first time. On 30 Jan., 19:15, Fabio Maulo fabioma...@gmail.com wrote: autoimport=false To allow you to easy write an HQL NH is registering the even name of the class. For example:

Re: [nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Fabio Maulo
re-read the name of the API and you will understand the reason we are not supporting it there. 2010/1/30 Armin Landscheidt saij...@googlemail.com I saw several threads about deleting an object without loading it or using proxy objects. I think to do this with the Criteria API would be very

[nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Armin Landscheidt
Hmm I re-read it but I don't understand. Defining a criteria does not explain what you do with the criteria. If I'm right with HQL I can do deletion and update stuff. So its just a sugestion that it would be nice to do simple deletions and updates with the cirteria api too. If the criteria api is

Re: [nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Fabio Maulo
Criteria for retrieve entities HQL : Hibernate Query Language With HQL you can run update/delete/insert queries. Some posts : http://fabiomaulo.blogspot.com/2009/09/nhibernate-queries.html http://fabiomaulo.blogspot.com/2009/09/nhibernate-queries.html

Re: [nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Mohamed Meligy
+1 for this. I think Update/Delete in HQL is sort of recent, and it'll be great if NH 3.0 could support the same in Criteria also, or DetachedCriteria. Regards, -- Mohamed Meligy Senior Developer, Team Lead Backup (.Net Technologies - TDG - Applications) Injazat Data Systems P.O. Box: 8230 Abu

Re: [nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Fabio Maulo
Create the issue and vote for it 2010/1/30 Mohamed Meligy eng.mel...@gmail.com +1 for this. I think Update/Delete in HQL is sort of recent, and it'll be great if NH 3.0 could support the same in Criteria also, or DetachedCriteria. Regards, -- Mohamed Meligy Senior Developer, Team Lead

Re: [nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Fabio Maulo
and, please, try to add some proposal for the API with something else than a simple assign of a field. 2010/1/30 Fabio Maulo fabioma...@gmail.com Create the issue and vote for it 2010/1/30 Mohamed Meligy eng.mel...@gmail.com +1 for this. I think Update/Delete in HQL is sort of recent, and

[nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Armin Landscheidt
Ok thanks a lot for your answers. I will create an issue for the feature request. I will try to define some usecases. On 30 Jan., 20:24, Fabio Maulo fabioma...@gmail.com wrote: and, please, try to add some proposal for the API with something else than a simple assign of a field. 2010/1/30

Re: [nhusers] Nhibernate stored procedures output parameters

2010-01-30 Thread Mohamed Meligy
No offense, but, specifically in the ALT.NET world, and more specifically in NHibernate, isn't it too frequent to hear this is not supported / this is not the way it works / ... followed by the other sentence FOR GOOD REASONS or something equivalent? Was just thinking ... Regards, -- Mohamed

Re: [nhusers] Re: Criteria API for deletion / updates

2010-01-30 Thread Fabio Maulo
Thanks to you. 2010/1/30 Armin Landscheidt saij...@googlemail.com Ok thanks a lot for your answers. I will create an issue for the feature request. I will try to define some usecases. On 30 Jan., 20:24, Fabio Maulo fabioma...@gmail.com wrote: and, please, try to add some proposal for the

Re: [nhusers] Nhibernate stored procedures output parameters

2010-01-30 Thread Fabio Maulo
Mohamed, try to complete the answer with more context instead say what Diego should explain ;) btw I'm having some doubts about Diego's answer basically because this test should fail [Test] public void ScalarStoredProcedure() { ISession s = OpenSession(); IQuery namedQuery =

Re: [nhusers] Nhibernate stored procedures output parameters

2010-01-30 Thread Diego Mijelshon
Maybe. Originally, my answer was going to be just yes, but that might give him/her the idea that support for output parameters is something missing. Anyway, to bring this back on topic: one of NHibernate major features (and selling points) is being able to create DBMS-agnostic code, although it

Re: [nhusers] Nhibernate stored procedures output parameters

2010-01-30 Thread Diego Mijelshon
That a SP returning a single value, not an output parameter... 15.2.2.1: ...The procedure must return a result set. NHibernate will use IDbCommand.ExecuteReader() to obtain the results. Diego On Sat, Jan 30, 2010 at 17:17, Fabio Maulo fabioma...@gmail.com wrote: Mohamed, try to complete

Re: [nhusers] Nhibernate stored procedures output parameters

2010-01-30 Thread Fabio Maulo
Yes you are right... now is clear which is the good reason ;) perhaps the same because we avoid the usage of SP LOL 2010/1/30 Diego Mijelshon di...@mijelshon.com.ar That a SP returning a single value, not an output parameter... 15.2.2.1: ...The procedure must return a result set. NHibernate

Re: [nhusers] Nhibernate stored procedures output parameters

2010-01-30 Thread Diego Mijelshon
In fact, that same section specifies a workaround for using stored procedures with output parameters: [...]If you still want to use these procedures you have to execute them via session.Connection. So, it's as easy as: var command = session.Connection.CreateCommand(); var parameter =

[nhusers] Re: Aggregate Root + Collections + Updates

2010-01-30 Thread Lionel Orellana
That could also mean Comment is a separate aggregate and that would be alrgith too. On Jan 30, 11:36 pm, Paul Hinett p...@ukcreativedesigns.com wrote: Thats the same conclusion i had came to. I may have to sacrifice strict DDD for a more performant application. Thank you for the reply!