-->
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.  [ 1 post ] 
Author Message
 Post subject: MySql 4.0.25 and Formula Fields
PostPosted: Sat Jun 10, 2006 10:39 am 
Newbie

Joined: Sat Jun 10, 2006 10:24 am
Posts: 16
Hi People,

I'm using MySql version 4.0.25 and have a formula field on one of my properties that has this sub query in it:

<property name='Rating' type='Decimal' column='Rating'
formula='(select avg(rating.Value) from rating where rating.LinkId = Id)' />

Now I only discovered recently that MySQL version < 4.1 doesn't support sub queries :( is there a work around so I can still specify it in my mapping without having to change my code? maybe use an inner join for the avg rather than a sub query?

Really apprciate your help!
-Alex

PS Nhibernate is awesome, I have tried nearly every ORM and this one is still the best by miles! :)

NHibernate version:1.2.0.Alpha1
Name and version of the database you are using: MySql '4.0.25-nt-max'


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

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.