File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate Parsers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Parsers" Watch "Hibernate Parsers" New topic

Hibernate Parsers

Paul Croarkin
Ranch Hand

Joined: Sep 30, 2004
Posts: 106
Patrick and Nick,

Could you outline the pros / cons of using the new AST parser versus using the classic HQL parser?

Thanks,<br /> <br />Paul Croarkin<br />SCEA 5, SCWCD, SCJP
Nick Heudecker
Ranch Hand

Joined: Jul 09, 2000
Posts: 52
I haven't noticed much difference from the developer perspective. The really nice thing about the AST parser is how easy it is to add native functions to your chosen Dialect subclass using the SQLFunction interface.

---<br />Co-author of "Hibernate Quickly"<br /><a href="" target="_blank" rel="nofollow"></a>
Patrick Peak

Joined: Aug 23, 2005
Posts: 19
I haven't really dug into the new parser enought yet to do a valid compare and constrast. I suspect it won't matter much for projects started with Hibernate 3.0, if anything giving more meaningful error messages.

The one time it could possiblybe an issue is when updating a project with lots of existing HQL from 2.0 to 3.0. Nick ran into this a bit while writing the book I believe.

Hibernate Quickly - <a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: Hibernate Parsers
It's not a secret anymore!