April 06, 2003

Open Source Fun

Well, I never really got an answer on the tough questions that I was asking about Hibernate, so I decided to go a different route. I started using the old tried and true HQL instead of trying to use the new expression syntax only to find out that HQL has issues of its own. Bummer.

I was trying to put aggregate functions into a POJO. That is unclear, so I will use a picture (ya know... 1000 words...). Here is the HQL:

select new Family(mother, count(kittens)) 
from Cat as mother 
left join mother.kittens 

Which was in turn generating:

select mother.name, countkittens) 
from Cat as mother....

That one paren isn't a typo. That is what was being generated. I tracked it down, fixed it and submitted it back to the project.

It feels good to help out, I am just not very proactive. I definately would like to fix the expression syntax so that it would work, but I am very afraid that I will implment it wrong, or wont have the same ideas that the project lead has. Maybe I should just jump in and do it. That is kinda scary. It isn't like this is some peice of code that only I am ever going to see, this is an open source project and a popular one at that! My greatest fear: "Hi, my name is Carl, and I screwed up Hibernate. Thanks for having me here at OSPKA." (Open Source Project Killers Anonymous)

Posted by carl at April 6, 2003 01:14 AM

Comments