By spec it has two params. But you can nest function calls.

Actually, as it is implemented, you can define a template like
concat(?1, ?2, ?3, ?4, ?5). Pass just two arguments will result in,
depending on the template, (?1 || ?2).

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Max Rydahl Andersen
> Sent: Wednesday, December 22, 2004 11:14 AM
> To: Hibernate development
> Subject: Re: [Hibernate] new template-based hql functions
> 
> On Wed, 22 Dec 2004 03:46:03 -0600, Alexey  Loubyansky 
> <[EMAIL PROTECTED]>
> wrote:
> 
> > package org.hibernate.test.hql;
> > org.hibernate.test.hql.HQLTest
> > public class HQLTest extends QueryTranslatorTestCase {
> >     public void testExpressionInFunction() throws Exception {
> >             assertTranslation( "from Animal an where 
> an.description = 
> > concat('fat'||'skinny')" );
> >
> > concat is recognized as a template function and the 
> template is applied.
> > The template is concat(?1, ?2) as defined in the EJBQL. Of 
> course, the 
> > test fails.
> >
> > Should we still support the old fat skinny one?
> 
> Shouldn't concat allow CONCAT(str1,str2,...) or is that too 
> magically ? ;) (that would support both cases)...or more 
> simpler have two templates:
> 
> concat(?1) and concat(?2) even though the first one would be a noop..
> 
> /max
> 
> >
> > -------------------------------------------------------
> > 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://productguide.itmanagersjournal.com/
> > _______________________________________________
> > hibernate-devel mailing list
> > hibernate-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/hibernate-devel
> 
> 
> 
> --
> Max Rydahl Andersen
> callto://max.rydahl.andersen
> 
> 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://productguide.itmanagersjournal.com/
> _______________________________________________
> 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://productguide.itmanagersjournal.com/
_______________________________________________
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to