Re: [nhusers] Re: Error in named queries

2010-05-18 Thread Oskar Berggren
No inner exception? /Oskar 2010/5/18 Eric J seeri...@gmail.com: That was about as much exception details as it gave. Here's the full call stack: Page_Init Exception: NHibernate.HibernateException: Errors in named queries: {Load.DeedInLieu.BusinessObjects.DeedInLieuNotes.SelectByDilId} at

Re: [nhusers] How to retrieve row count of one-to-many relation while also including original entity?

2010-05-18 Thread James Crowley
I too would be interested to get people's suggestions on how best to do this? You can't seem to get the AliasToBean transformer to deal with the fact we want to set properties on a child property of the DTO either? Would appreciate any pointers you guys have! Thanks James On 10 May 2010 13:17,

[nhusers] Re: NHibernate and .Net 4.0 compatibility issues

2010-05-18 Thread Trinition
We just kicked off a Silverlight 4, WCF, .NET 4 project with NHibernate. We've already passed our first NHibernate calls originating on WCF threads without a problem. On May 17, 9:28 am, Mehran mehran.tah...@gmail.com wrote: Hi all, We have a project written in Silverlight and WCF. The

Re: [nhusers] How to retrieve row count of one-to-many relation while also including original entity?

2010-05-18 Thread nadav s
may be write the sql thisway: select foo.*, (select count(*) from bars where bars.fooid = foo.id) barsCount from foo The folowing code executes the query and get the results you wanted IClassMetadata deptMetaData =

Re: [nhusers] How to retrieve row count of one-to-many relation while also including original entity?

2010-05-18 Thread Diego Mijelshon
Yes, it works. Diego On Tue, May 18, 2010 at 09:27, Mohamed Meligy eng.mel...@gmail.com wrote: Does this work on NH trunk LINQ provider? var query = from foo in session.QueryFoo() select new FooDTO {Foo = foo, BarCount = foo.Bars.Count()}; I think typically the problem for this might

[nhusers] Struggling mapping various things with contact information

2010-05-18 Thread Trinition
In my domain, I have various things which have contact information (name, address, etc.): Clients, Users and GeneralContacts. Mind you, from the domain's perspective, these aren't all just specialized types of contacts, but all things that happen to have contact information. Thus, I've avoided

[nhusers] Re: Struggling mapping various things with contact information

2010-05-18 Thread Trinition
I seem have gotten this working. many-to-one name=Contact column=ContactID access=nosetter.camelcase-underscore cascade=all unique=true fetch=join / Regards, Brian. On May 18, 10:21 am, Trinition trinit...@gmail.com wrote: In my domain, I have various things which have contact information

Re: [nhusers] How to retrieve row count of one-to-many relation while also including original entity?

2010-05-18 Thread James Crowley
Unfortunately it doesn't seem to work the moment you want to add any kind of order by clause relating to BarCount. James On 18 May 2010 14:22, Diego Mijelshon di...@mijelshon.com.ar wrote: Yes, it works. Diego On Tue, May 18, 2010 at 09:27, Mohamed Meligy eng.mel...@gmail.comwrote:

Re: [nhusers] How to retrieve row count of one-to-many relation while also including original entity?

2010-05-18 Thread nadav s
With linq trying to order by the count throws exception with criteria it will work, the sub query is just another projection On Tue, May 18, 2010 at 6:21 PM, James Crowley james.crow...@gmail.comwrote: Unfortunately it doesn't seem to work the moment you want to add any kind of order by clause

[nhusers] Re: Error in named queries

2010-05-18 Thread Eric J
Nope, that's all it gives me. It's obviously in an ASP.NET page, in the Page_Init event. It's initializing a DAO factory when it gets the exception. On May 18, 12:00 am, Oskar Berggren oskar.bergg...@gmail.com wrote: No inner exception? /Oskar 2010/5/18 Eric J seeri...@gmail.com:

[nhusers] Re: Future and caching.

2010-05-18 Thread graphicsxp
up. no one has an idea regarding this ? On 12 mai, 22:48, graphicsxp graphic...@googlemail.com wrote: Hi, I'm trying to use the Future() method and it works fine except I don't know how to take advantage of caching with it :       var countArt =

Re: [nhusers] Re: Future and caching.

2010-05-18 Thread Richard Brown (gmail)
Should work in the trunk version: http://216.121.112.228/browse/NH-1989 -- From: graphicsxp graphic...@googlemail.com Sent: Tuesday, May 18, 2010 5:02 PM To: nhusers nhusers@googlegroups.com Subject: [nhusers] Re: Future and caching. up. no one

Re: [nhusers] How to retrieve row count of one-to-many relation while also including original entity?

2010-05-18 Thread nadav s
I think the most common scenario is paging in the query to fetch only the records in the current page, so its too bad you can't order by the count projection with linq On Tue, May 18, 2010 at 6:53 PM, Diego Mijelshon di...@mijelshon.com.arwrote: Unless you need server-side paging, you can

Re: [nhusers] How to retrieve row count of one-to-many relation while also including original entity?

2010-05-18 Thread Diego Mijelshon
The most common scenario based on which stats? Anyway, yeah, it's annoying. It's worth opening a JIRA. Diego On Tue, May 18, 2010 at 13:38, nadav s nadav...@gmail.com wrote: I think the most common scenario is paging in the query to fetch only the records in the current page, so its too

[nhusers] Re: Future and caching.

2010-05-18 Thread graphicsxp
ha yes, thanks for the link. I usually prefer using release versions. Is this a reliable version of NH ? (there's no sarcasm here, just asking) On 18 mai, 18:26, Richard Brown \(gmail\) fluke...@googlemail.com wrote: Should work in the trunk version: http://216.121.112.228/browse/NH-1989

Re: [nhusers] Collection Sum + Projections

2010-05-18 Thread nadav s
Use criteria.SetProjections with Projections.Property for the id column and Projections.SubQuery with a DetachedCriteria for the counting of the Debits On Tue, May 18, 2010 at 5:25 PM, Paulo Quicoli pauloquic...@gmail.comwrote: Hi Friends, I'm not figuring out how to perform this using

Re: [nhusers] Re: Future and caching.

2010-05-18 Thread Mohamed Meligy
With the current state of features/fixes in NH, I find it very hard for me to avoid using Trunk version. Using it for a couple of production applications still currently evolving, updating every 1-3 weeks depending on active development. Works with no issues so far. -- Mohamed Meligy Senior

[nhusers] Problem with group-by using Criteria API

2010-05-18 Thread Brian Berns
I am trying to recreate something like the following SQL using NHibernate criteria: select Range, count(*) from ( select case when Name between 'A' and 'N' then 'A-M' else 'Other' end as Range from Subject ) tbl group by tbl.Range It