Title: Message
 
Hi,
 
Just a general comment.
 
+1 on being able to get HQL to parse and process the longer versions but
 
-1 on removing older syntax. I like the short versions and would rather they were kept since I consider them to be convenient rather than redundant. I guess im use to them. In addition, its also a characteristic that makes HQL ...well HQL.
 
Side note: I tend to prefer 'left fetch join' which is supported by the old parser. Whats the chance to allow the new parser to accept it? I am prepared to add it myself but it might just be me that has this syntax preference.
 
Cheers David.
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gavin King
Sent: Friday, 25 February 2005 11:22 PM
To: 'hibernate-devel@lists.sourceforge.net'
Subject: [Hibernate] New query parser

Guys, I’d like to slightly change how the new parser handles a couple of exotic (redundant) constructs. Basically, what I want, is that the first phase of parsing produces a HQL AST with a much simpler canonical form, with less Kinds of Things. So, for example:

  • “elements(foo.collection)” would be replaced with “(from foo.collection)”
  • “indices (foo.collection)” would be replaced with “(select index(x) from foo.collection x)”

So far, so good, I already managed to implement this in hql.g, it was straightforward. But I also want:

  • “from Foo foo where foo.map[key] = ‘blah’” to be transformed to “from Foo foo join foo.map x where index(x) = ‘blah’

And now I gotta problem. Trouble is that it seems quite difficult to stick new join clauses onto the from clause, when we discover stuff further down the tree.

Can this even be done?

-- 
Gavin King
+61 410 534 454
+1 404 822 8349
callto://gavinking

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com

-- 
Gavin King
+61 410 534 454
+1 404 822 8349
callto://gavinking

Hibernate
[EMAIL PROTECTED]
http://hibernate.org

JBoss Inc
[EMAIL PROTECTED]
http://jboss.com

Reply via email to