[Hibernate] New query parser: Almost There!
Guys, we got one last remaining serious bug – some HQLTests with index() or [] fail when using a Dialect with theta-style outerjoins. After that, I only got very little things that don’t really matter for being able to release. Let’s get this last one 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 --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] New query parser
What I meant was that the HQL parser would transform the HQL tree to the longer form before passing off to the HQL/SQL walker. I didn't mean anything about the user visible syntax. Actually, I succeeded in implementing this, but I never committed it, it doesn't really look like we will need it now. However, since you touch on this, I *did* make a decision to no longer support elements() and indices() etc, functions in the select clause, since that had very non-intuitive semantics, and was just generally a Bad Thing. (elements() meant something completely different in the select clause to what it meant in the where clause) dchannon wrote: 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 -- 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 --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] New query parser: Almost There!
It seems that the theta WHERE fragments aren't being included in the SQL tree because the FromElement has the 'useWhereFragment' flag set to false by MethodNode.resolveCollectionProperty. This is interesting because MethodNode.resolveCollectionProperty is the *only* place that sets this flag. Probably the best idea would be to replace useWhereFragment with some conditional logic in the join post processing code that creates the theta joins. I'm not sure what that logic would be, as there seems to be no way of finding out whether the dialect supports ANSI joins directly. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Gavin King > Sent: Sunday, February 27, 2005 9:34 AM > To: 'hibernate-devel@lists.sourceforge.net' > Subject: [Hibernate] New query parser: Almost There! > > > Guys, we got one last remaining serious bug - some HQLTests > with index() > or [] fail when using a Dialect with theta-style outerjoins. > > After that, I only got very little things that don't really > matter for > being able to release. > > Let's get this last one 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 > > > > --- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from > real users. Discover which products truly live up to the > hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick > ___ > hibernate-devel mailing list hibernate-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
RE: [Hibernate] New query parser: Almost There!
> -Original Message- > From: Gavin King [mailto:[EMAIL PROTECTED] > Sent: Sunday, February 27, 2005 1:30 PM > To: Joshua Davis; Gavin King; hibernate-devel@lists.sourceforge.net > Subject: RE: [Hibernate] New query parser: Almost There! > > > We could easily add a method to determine if we have > theta-style outer joins. But I'm not sure that that is > enough, since other "stuff" can find its way into the where > fragment... (we need to exclude that stuff, without excluding > the theta joins) Agreed. I just took a look at what OracleJoinFragment is doing and it seems like one route we could go is to simply expose more of what JoinFragment is doing so that SyntheticAndFactory can pick out the parts that it needs in this specific case (useWhereFragment is false). --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] CGLIB reenhancement
Just not to forget when we upgrade http://forum.hibernate.org/viewtopic.php?t=938730&postdays=0&postorder=asc&start=15 BTW I have added jar file support and filtering by "magic" number. "getTransformer" was changed to use array of class and interface names, it will help to remove custom class file visitor to detect duplicate enhancement (you need to remove it for jar file enhancement support). if ( Arrays.asList(names).contains( INTERCEPT_ENABLED ) ) return null; -- Emmanuel Bernard [EMAIL PROTECTED] callto://emmanuelbernard http://www.hibernate.org --- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click ___ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel