Re: [hibernate-dev] Forcing an optimize call after a purgeAll

2008-07-14 Thread Sanne Grinovero
I agree with all of you, if the user wants it he can just call it
using a single line of code.
So I would not do that automatically.

Sanne

2008/7/14 Hardy Ferentschik <[EMAIL PROTECTED]>:
> On Sun, 13 Jul 2008 21:46:05 +0200, John Griffin <[EMAIL PROTECTED]>
> wrote:
>
>> I would not force it, but I would allow it to happen probably by a config
>> option. As you know optimize causes a rewrite of the Lucene document
>> numbers
>> and the user may not want to do that until THEY decide to do it. My 2
>> cents.
>
> I also opt no. Both API calls are there. Let the user control it.
>
> --Hardy
>
>
> ___
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev


[hibernate-dev] Case...When..then... problem

2008-07-14 Thread ManiKanta G

Hi,

I've a query in MySQL which includes CASE WHEN... THEN...THENEND 
type, which i working fine.


select cds.id,
case when cds.source_type = 'c'
then (select cm.company_name from esi_companymaster cm where 
cm.company_code = cds.source_id)

when cds.source_type = 'd'
then (select dm.dealer_name from esi_dealermaster dm where 
dm.dealer_code = cds.source_id) end

as company_dealer_name
from esi_cds_issues_dispensary_details cds

But when I converted the same into HQL, like the below one:

select cds.id,
case when cds.sourceType is 'c'
then (select cm.companyName from CompanyMaster cm where cm.companyCode = 
cds.sourceId)

when cds.sourceType is 'd'
then (select dm.dealerName from DealerMaster dm where dm.dealerCode = 
cds.sourceId) end

as company_dealer_name
from IssuestoDispenceryDetails cds

I m getting NullPointerException (unexpected AST node: query) exception.

Can any one suggest me what am I doing wrong? or is there any work 
around for this.


I need this very urgent. Thanks in advance.


Regards,
ManiKanta G




** DISCLAIMER **
Information contained and transmitted by this E-MAIL is proprietary to 
Sify Limited and is intended for use only by the individual or entity to 
which it is addressed, and may contain information that is privileged, 
confidential or exempt from disclosure under applicable law. If this is a 
forwarded message, the content of this E-MAIL may not have been sent with 
the authority of the Company. If you are not the intended recipient, an 
agent of the intended recipient or a  person responsible for delivering the 
information to the named recipient,  you are notified that any use, 
distribution, transmission, printing, copying or dissemination of this 
information in any way or in any manner is strictly prohibited. If you have 
received this communication in error, please delete this mail & notify us 
immediately at [EMAIL PROTECTED]
___
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev