-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Added multi criteria support for Oracle ODP
PostPosted: Sat Dec 26, 2009 7:08 am 
Newbie

Joined: Sat Dec 26, 2009 7:05 am
Posts: 8
my team is about to start building a web app with nhibernate, and while reviewing the tool i became a big fan.
there are one or two stuff missing and i've decided to add them my self
first of all, i've noticed there's no oracle driver support for MultiCriteria
so i've added to the code to support it. because oracle support for select statement batching is alot different than sqlServer, i've decided to add new MultiCriteria implementation for oracle, which batch the sql to gether using annonymous pl/sql block, and open as many ref cursors as neccessary

it turned out great and it is working. wanted to ask you if you want to get the implementation and make it a built in to nhibernate


secondly, i want to take the NHibernate.Linq code and create a criteria that supports both criterion and linq expressions, and also make some optimizations on the queries generated by linq (if i do query.Where(department => department.employees.count > 5)
i get a not optimized sql (where in the sub query there is an un-neccessary join. i think it should be translated into a join criteria instead of a sub query, where the employees are joined with their department, grouped by department id and then check the count. and if it is a sub query, than there shouldn't be a join in the sub query (the departments table should be read by the DB only once)

unfortunately i only found the source code of NHibernate.Linq-1.0.0.GA-src

and not for NHibernate.Linq-2.1.2.
so i was hoping you could upload the source.



edit:
i was working on he linq 1.0.0 code, and fix some bugs:
dept=>dept,Employees.Any() - it made a very strange query. i modified it to return the criterion expression.notempty
depty=>dept.employees.count>5 - it made an unneccessary join in the sub query. fixed it

again. i don't know how or who should i tell this to so i write it here.
i'll be happy to contribute the code (at least the multi criteria for oracle, i'm sure everyone who uses oracle would love that feature)


Top
 Profile  
 
 Post subject: Re: Added multi criteria support for Oracle ODP
PostPosted: Tue Feb 02, 2010 7:45 am 
Newbie

Joined: Tue Feb 02, 2010 7:40 am
Posts: 1
I think it would be very useful addition!
Would you please e-mail it to me to start using without waiting for NHibernate next update? Thanks!


Top
 Profile  
 
 Post subject: Re: Added multi criteria support for Oracle ODP
PostPosted: Fri Feb 05, 2010 2:12 pm 
Newbie

Joined: Sat Dec 26, 2009 7:05 am
Posts: 8
i'll send you my modified code
i've also added a new feature:
a nhibernate-config key that determines weather proxies (also collection proxies) should reconnect the session if it is disconnect.

again its a key in the config so the user can decide what behaviour he wants (curently the proxies always throw an exception). i've done this only for disconnected session but not for a closed one, beacuse it is the case in my project.


no body had returned to me about the multi criteria for ODP which i think can be very useful for anyone working with nhibernate and oracle
i'd love if somebody can tell me how can i add this code to the source safe of nhibernate, or tell me you don't want this, but please reply :)

my mail is nadavsof@gmail.com


Top
 Profile  
 
 Post subject: Re: Added multi criteria support for Oracle ODP
PostPosted: Fri Feb 05, 2010 2:20 pm 
Newbie

Joined: Sat Dec 26, 2009 7:05 am
Posts: 8
barser- i've be happy to. just give me you mail (you can mail me, my mail is in my previous post in this thread)


Top
 Profile  
 
 Post subject: Re: Added multi criteria support for Oracle ODP
PostPosted: Mon Feb 08, 2010 11:33 pm 
Newbie

Joined: Mon Feb 08, 2010 11:26 pm
Posts: 1
@nadavsof, I believe you will get a faster response if you post the issue and the fix for multi criteria support for ODP.NET at http://nhjira.koah.net/secure/Dashboard.jspa

Thanks for contributing to the community


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.