- Add composite id =
- on is more SQL thus less intrusive
- instanceof is cool, but casting is more useful
where ( p instanceof Cheque and ((Cheque) p).paperType = :paperType) or (p instanceof CreditCard and ((CreditCard) p).pinCode)


Gavin King wrote:

One of the main reasons we migrated to the new query parser was to allow for easier extension of HQL. We didn't actually make much in the way of HQL extensions in 3.0 (except for UPDATE/DELETE, CASE and EJB-QL functions). I've been wondering what new cool stuff we could consider for 3.1.

First, we need to add a way to add extra conditions to outer joins. Eg:

  from Order ord
     left join ord.lines line on line.deleted is false
  where ...

But perhaps "on" is the wrong keyword, since it is an "extra" join condition. Perhaps "filter by"?

  from Order ord
     left join ord.lines line filter by line.deleted is false
  where ...

I'm not sure.

Next, it's about time we had a reliable instanceof operator:

  from Payment p
  where p instanceof Cheque
     or ....

Next, I'm considering adding more query-level control over fetching strategies

  from Order ord
     subselect fetch ord.lines

  from Order ord
     select fetch ord.lines

  from Order ord
     batch fetch ord.lines

  from Order ord
     batch size 10 fetch ord.lines

Finally, we need to grapple with the problem of supporting expressions in the select clause.

Do you think we could and should support the ANSI SQL style periods and temporal operators (overlaps, during, before, after, etc.) in a portable way?

from Contract c where [c.effectiveStartDate, c.effectiveEndDate] overlaps (:start, :end]

(Unfortunately, Java has no Period or Interval class that we could create a standard Hibernate Type for.)


Any other ideas?




-------------------------------------------------------
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

Reply via email to