You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by TarakBhandary <re...@gmail.com> on 2009/03/19 07:25:05 UTC

need createCriteria help

I am not getting the required result from the following, will anybody help me
out............

public List listAll(){
        
        ContactInfoExample example = new ContactInfoExample();
        example.createCriteria().andIdContactInfoEqualTo(24);
        return contactInfoDAO.selectByExample(example);
     }
-- 
View this message in context: http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


RE: need createCriteria help

Posted by meindert <me...@eduflex.com>.
Sorry, I don't see anything wrong with the way you are using the generated
code.
And I'm not even going to ask you for the detailed information 
(to find out what is wrong) because it would quite likely also show yourself
what is wrong with the generated code.
So my unhelpful answer is;
Debug it and report the bug that you discovered in the code generated by
ibatus.

I love ibatus in the transparent and easy to debug way it creates the
queries.

Meindert

-----Original Message-----
From: TarakBhandary [mailto:reach2tarak@gmail.com] 
Sent: 19 March 2009 12:18 PM
To: user-java@ibatis.apache.org
Subject: RE: need createCriteria help


I agreed with your views but here I have something to say, that there is the
methods available, which I am using to fetch the records, right. Now I am
not getting my results according to the requirement. I have done this
according to there document. Now what I am trying to say is the tool is
provide us the sql code then why I write those sql manually. If methods are
there to retrieve the record then I should use those methods with compatible
to the framework, isn't it.

Now what is reason behind that my method is not giving me the actual output
then is the given example class methods are wrong or the way I am using that
is wrong.

Here I am not finding any answer. Hope u ll give me some better idea
regarding this matter.


meindert-3 wrote:
> 
>>Is it the way to fetch the records.
> It's a universal way to fetch records. The power in ibatis is the control
> over your queries and the ease of debugging.
> Hibernate is probably the better tool if you don't want query control or
> if
> you want your persistent layer to create the DB
> 
>> Do u have any other way to fetch the conditional records.
> Definitely, just add your custom method to the DAO and to the sqlmaps.
> For your example where you have just one (integer) criteria that you want
> to
> put in the where clause I would
> look in the sqlmap's xml file how the query is actual structured and make
> your own query taking a 'int' as parameterclass 
> The query would look something like;
> SELECT X FROM Y WHERE Z=#value#
> Or you can use ContactInfo as parameterclass, the query would be
> SELECT X FROM Y WHERE Z=#idContactInfo#
> 
> In fact, I rarely let ibator generate the selectbyExample code.
> 
> -----Original Message-----
> From: TarakBhandary [mailto:reach2tarak@gmail.com] 
> Sent: 19 March 2009 11:43 AM
> To: user-java@ibatis.apache.org
> Subject: RE: need createCriteria help
> 
> 
> Thanks for the reply. Do you think that my method is ok? Is it the way to
> fetch the records. Do u have any other way to fetch the conditional
> records.
> 
> 
> meindert-3 wrote:
>> 
>> Hi tarak,
>> 
>> It's probably the quickest to debug yourself;
>> - What is wrong in the result set?
>> - Did you get log4j working, and do you see the generated query?
>> ==> What is wrong with the generated query?
>> - Put a breakpoint and view the example class and logical check this
>> against
>> the query map in your xml.
>> 
>> This should make it fairly clear from this what is wrong.
>> 
>> Kind Regards
>>  Meindert
>> 
>> -----Original Message-----
>> From: TarakBhandary [mailto:reach2tarak@gmail.com] 
>> Sent: 19 March 2009 11:10 AM
>> To: user-java@ibatis.apache.org
>> Subject: Re: need createCriteria help
>> 
>> 
>> Look its not possible to post all the pages. I have post the listAll
>> method
>> where I am trying to get the result as the sql query. I will post the
>> source
>> code if it is in one page, but its linked in so many pages. So it is not
>> possible at this moment. 
>> 
>> 
>> Kengkaj Sathianpantarit wrote:
>>> 
>>> I haven't tried the Example class because I don't have source codes.
>>> 
>>> As you said you did according to the doc, can you post source codes, and
>>> XML
>>> mapping?
>>> 
>>> Kengkaj
>>> 
>>> On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary
>>> <re...@gmail.com>wrote:
>>> 
>>>>
>>>> I read the doc but that is not enough for me. Actually I am done
>>>> according
>>>> to
>>>> the doc but still getting my required result. Thats why i need ur help.
>>>> I
>>>> dont understand why i am not getting my desire result.
>>>>
>>>> Do u ever tried this example class. I mean
>>>> example.createCriteria()....?
>>>> if yes then tell me where was i am going wrong.
>>>>
>>>>
>>>> TarakBhandary wrote:
>>>> >
>>>> > Are you mocking me......................?? Its sounds like that.
>>>> > Anyways thanks for the link...............
>>>> >
>>>> >
>>>> > Kengkaj Sathianpantarit wrote:
>>>> >>
>>>> >> You can download dev guide from the link as follows.
>>>> >> http://ibatis.apache.org/onlinehelp.html
>>>> >>
>>>> >> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
>>>> >> right.
>>>> >>
>>>> >> Kengkaj
>>>> >>
>>>> >> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
>>>> >> <re...@gmail.com>wrote:
>>>> >>
>>>> >>>
>>>> >>> Actually i dont have enough knowledge in this pls help me out i
>>>> have
>>>> to
>>>> >>> do
>>>> >>> the job as soon as possible.
>>>> >>> If there is any link which will help me out pls provide.
>>>> >>>
>>>> >>>
>>>> >>> Kengkaj Sathianpantarit wrote:
>>>> >>> >
>>>> >>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>>>> >>> >
>>>> >>> > Kengkaj
>>>> >>> >
>>>> >>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>>>> >>> > <re...@gmail.com>wrote:
>>>> >>> >
>>>> >>> >>
>>>> >>> >> I am not getting the required result from the following, will
>>>> anybody
>>>> >>> >> help
>>>> >>> >> me
>>>> >>> >> out............
>>>> >>> >>
>>>> >>> >> public List listAll(){
>>>> >>> >>
>>>> >>> >>        ContactInfoExample example = new ContactInfoExample();
>>>> >>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>>>> >>> >>        return contactInfoDAO.selectByExample(example);
>>>> >>> >>     }
>>>> >>> >> --
>>>> >>> >> View this message in context:
>>>> >>> >>
>>>> >>>
>>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>>>> >>> >> Sent from the iBATIS - User - Java mailing list archive at
>>>> >>> Nabble.com.
>>>> >>> >>
>>>> >>> >>
>>>> >>> >
>>>> >>> >
>>>> >>>
>>>> >>> --
>>>> >>> View this message in context:
>>>> >>>
>>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>>>> >>> Sent from the iBATIS - User - Java mailing list archive at
>>>> Nabble.com.
>>>> >>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
>>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>>>
>>>>
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22595554.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>> 
>> 
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com 
>> Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date:
>> 03/17/09
>> 16:25:00
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/need-createCriteria-help-tp22594367p22596627.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date: 03/17/09
> 16:25:00
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/need-createCriteria-help-tp22594367p22597110.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date: 03/17/09
16:25:00


RE: need createCriteria help

Posted by TarakBhandary <re...@gmail.com>.
I agreed with your views but here I have something to say, that there is the
methods available, which I am using to fetch the records, right. Now I am
not getting my results according to the requirement. I have done this
according to there document. Now what I am trying to say is the tool is
provide us the sql code then why I write those sql manually. If methods are
there to retrieve the record then I should use those methods with compatible
to the framework, isn't it.

Now what is reason behind that my method is not giving me the actual output
then is the given example class methods are wrong or the way I am using that
is wrong.

Here I am not finding any answer. Hope u ll give me some better idea
regarding this matter.


meindert-3 wrote:
> 
>>Is it the way to fetch the records.
> It's a universal way to fetch records. The power in ibatis is the control
> over your queries and the ease of debugging.
> Hibernate is probably the better tool if you don't want query control or
> if
> you want your persistent layer to create the DB
> 
>> Do u have any other way to fetch the conditional records.
> Definitely, just add your custom method to the DAO and to the sqlmaps.
> For your example where you have just one (integer) criteria that you want
> to
> put in the where clause I would
> look in the sqlmap's xml file how the query is actual structured and make
> your own query taking a 'int' as parameterclass 
> The query would look something like;
> SELECT X FROM Y WHERE Z=#value#
> Or you can use ContactInfo as parameterclass, the query would be
> SELECT X FROM Y WHERE Z=#idContactInfo#
> 
> In fact, I rarely let ibator generate the selectbyExample code.
> 
> -----Original Message-----
> From: TarakBhandary [mailto:reach2tarak@gmail.com] 
> Sent: 19 March 2009 11:43 AM
> To: user-java@ibatis.apache.org
> Subject: RE: need createCriteria help
> 
> 
> Thanks for the reply. Do you think that my method is ok? Is it the way to
> fetch the records. Do u have any other way to fetch the conditional
> records.
> 
> 
> meindert-3 wrote:
>> 
>> Hi tarak,
>> 
>> It's probably the quickest to debug yourself;
>> - What is wrong in the result set?
>> - Did you get log4j working, and do you see the generated query?
>> ==> What is wrong with the generated query?
>> - Put a breakpoint and view the example class and logical check this
>> against
>> the query map in your xml.
>> 
>> This should make it fairly clear from this what is wrong.
>> 
>> Kind Regards
>>  Meindert
>> 
>> -----Original Message-----
>> From: TarakBhandary [mailto:reach2tarak@gmail.com] 
>> Sent: 19 March 2009 11:10 AM
>> To: user-java@ibatis.apache.org
>> Subject: Re: need createCriteria help
>> 
>> 
>> Look its not possible to post all the pages. I have post the listAll
>> method
>> where I am trying to get the result as the sql query. I will post the
>> source
>> code if it is in one page, but its linked in so many pages. So it is not
>> possible at this moment. 
>> 
>> 
>> Kengkaj Sathianpantarit wrote:
>>> 
>>> I haven't tried the Example class because I don't have source codes.
>>> 
>>> As you said you did according to the doc, can you post source codes, and
>>> XML
>>> mapping?
>>> 
>>> Kengkaj
>>> 
>>> On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary
>>> <re...@gmail.com>wrote:
>>> 
>>>>
>>>> I read the doc but that is not enough for me. Actually I am done
>>>> according
>>>> to
>>>> the doc but still getting my required result. Thats why i need ur help.
>>>> I
>>>> dont understand why i am not getting my desire result.
>>>>
>>>> Do u ever tried this example class. I mean
>>>> example.createCriteria()....?
>>>> if yes then tell me where was i am going wrong.
>>>>
>>>>
>>>> TarakBhandary wrote:
>>>> >
>>>> > Are you mocking me......................?? Its sounds like that.
>>>> > Anyways thanks for the link...............
>>>> >
>>>> >
>>>> > Kengkaj Sathianpantarit wrote:
>>>> >>
>>>> >> You can download dev guide from the link as follows.
>>>> >> http://ibatis.apache.org/onlinehelp.html
>>>> >>
>>>> >> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
>>>> >> right.
>>>> >>
>>>> >> Kengkaj
>>>> >>
>>>> >> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
>>>> >> <re...@gmail.com>wrote:
>>>> >>
>>>> >>>
>>>> >>> Actually i dont have enough knowledge in this pls help me out i
>>>> have
>>>> to
>>>> >>> do
>>>> >>> the job as soon as possible.
>>>> >>> If there is any link which will help me out pls provide.
>>>> >>>
>>>> >>>
>>>> >>> Kengkaj Sathianpantarit wrote:
>>>> >>> >
>>>> >>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>>>> >>> >
>>>> >>> > Kengkaj
>>>> >>> >
>>>> >>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>>>> >>> > <re...@gmail.com>wrote:
>>>> >>> >
>>>> >>> >>
>>>> >>> >> I am not getting the required result from the following, will
>>>> anybody
>>>> >>> >> help
>>>> >>> >> me
>>>> >>> >> out............
>>>> >>> >>
>>>> >>> >> public List listAll(){
>>>> >>> >>
>>>> >>> >>        ContactInfoExample example = new ContactInfoExample();
>>>> >>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>>>> >>> >>        return contactInfoDAO.selectByExample(example);
>>>> >>> >>     }
>>>> >>> >> --
>>>> >>> >> View this message in context:
>>>> >>> >>
>>>> >>>
>>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>>>> >>> >> Sent from the iBATIS - User - Java mailing list archive at
>>>> >>> Nabble.com.
>>>> >>> >>
>>>> >>> >>
>>>> >>> >
>>>> >>> >
>>>> >>>
>>>> >>> --
>>>> >>> View this message in context:
>>>> >>>
>>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>>>> >>> Sent from the iBATIS - User - Java mailing list archive at
>>>> Nabble.com.
>>>> >>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
>>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>>>
>>>>
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22595554.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>> 
>> 
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com 
>> Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date:
>> 03/17/09
>> 16:25:00
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/need-createCriteria-help-tp22594367p22596627.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date: 03/17/09
> 16:25:00
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/need-createCriteria-help-tp22594367p22597110.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


RE: need createCriteria help

Posted by meindert <me...@eduflex.com>.
>Is it the way to fetch the records.
It's a universal way to fetch records. The power in ibatis is the control
over your queries and the ease of debugging.
Hibernate is probably the better tool if you don't want query control or if
you want your persistent layer to create the DB

> Do u have any other way to fetch the conditional records.
Definitely, just add your custom method to the DAO and to the sqlmaps.
For your example where you have just one (integer) criteria that you want to
put in the where clause I would
look in the sqlmap's xml file how the query is actual structured and make
your own query taking a 'int' as parameterclass 
The query would look something like;
SELECT X FROM Y WHERE Z=#value#
Or you can use ContactInfo as parameterclass, the query would be
SELECT X FROM Y WHERE Z=#idContactInfo#

In fact, I rarely let ibator generate the selectbyExample code.

-----Original Message-----
From: TarakBhandary [mailto:reach2tarak@gmail.com] 
Sent: 19 March 2009 11:43 AM
To: user-java@ibatis.apache.org
Subject: RE: need createCriteria help


Thanks for the reply. Do you think that my method is ok? Is it the way to
fetch the records. Do u have any other way to fetch the conditional records.


meindert-3 wrote:
> 
> Hi tarak,
> 
> It's probably the quickest to debug yourself;
> - What is wrong in the result set?
> - Did you get log4j working, and do you see the generated query?
> ==> What is wrong with the generated query?
> - Put a breakpoint and view the example class and logical check this
> against
> the query map in your xml.
> 
> This should make it fairly clear from this what is wrong.
> 
> Kind Regards
>  Meindert
> 
> -----Original Message-----
> From: TarakBhandary [mailto:reach2tarak@gmail.com] 
> Sent: 19 March 2009 11:10 AM
> To: user-java@ibatis.apache.org
> Subject: Re: need createCriteria help
> 
> 
> Look its not possible to post all the pages. I have post the listAll
> method
> where I am trying to get the result as the sql query. I will post the
> source
> code if it is in one page, but its linked in so many pages. So it is not
> possible at this moment. 
> 
> 
> Kengkaj Sathianpantarit wrote:
>> 
>> I haven't tried the Example class because I don't have source codes.
>> 
>> As you said you did according to the doc, can you post source codes, and
>> XML
>> mapping?
>> 
>> Kengkaj
>> 
>> On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary
>> <re...@gmail.com>wrote:
>> 
>>>
>>> I read the doc but that is not enough for me. Actually I am done
>>> according
>>> to
>>> the doc but still getting my required result. Thats why i need ur help.
>>> I
>>> dont understand why i am not getting my desire result.
>>>
>>> Do u ever tried this example class. I mean example.createCriteria()....?
>>> if yes then tell me where was i am going wrong.
>>>
>>>
>>> TarakBhandary wrote:
>>> >
>>> > Are you mocking me......................?? Its sounds like that.
>>> > Anyways thanks for the link...............
>>> >
>>> >
>>> > Kengkaj Sathianpantarit wrote:
>>> >>
>>> >> You can download dev guide from the link as follows.
>>> >> http://ibatis.apache.org/onlinehelp.html
>>> >>
>>> >> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
>>> >> right.
>>> >>
>>> >> Kengkaj
>>> >>
>>> >> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
>>> >> <re...@gmail.com>wrote:
>>> >>
>>> >>>
>>> >>> Actually i dont have enough knowledge in this pls help me out i have
>>> to
>>> >>> do
>>> >>> the job as soon as possible.
>>> >>> If there is any link which will help me out pls provide.
>>> >>>
>>> >>>
>>> >>> Kengkaj Sathianpantarit wrote:
>>> >>> >
>>> >>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>>> >>> >
>>> >>> > Kengkaj
>>> >>> >
>>> >>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>>> >>> > <re...@gmail.com>wrote:
>>> >>> >
>>> >>> >>
>>> >>> >> I am not getting the required result from the following, will
>>> anybody
>>> >>> >> help
>>> >>> >> me
>>> >>> >> out............
>>> >>> >>
>>> >>> >> public List listAll(){
>>> >>> >>
>>> >>> >>        ContactInfoExample example = new ContactInfoExample();
>>> >>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>>> >>> >>        return contactInfoDAO.selectByExample(example);
>>> >>> >>     }
>>> >>> >> --
>>> >>> >> View this message in context:
>>> >>> >>
>>> >>>
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>>> >>> >> Sent from the iBATIS - User - Java mailing list archive at
>>> >>> Nabble.com.
>>> >>> >>
>>> >>> >>
>>> >>> >
>>> >>> >
>>> >>>
>>> >>> --
>>> >>> View this message in context:
>>> >>>
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>>> >>> Sent from the iBATIS - User - Java mailing list archive at
>>> Nabble.com.
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/need-createCriteria-help-tp22594367p22595554.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date: 03/17/09
> 16:25:00
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/need-createCriteria-help-tp22594367p22596627.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date: 03/17/09
16:25:00


RE: need createCriteria help

Posted by TarakBhandary <re...@gmail.com>.
Thanks for the reply. Do you think that my method is ok? Is it the way to
fetch the records. Do u have any other way to fetch the conditional records. 

meindert-3 wrote:
> 
> Hi tarak,
> 
> It's probably the quickest to debug yourself;
> - What is wrong in the result set?
> - Did you get log4j working, and do you see the generated query?
> ==> What is wrong with the generated query?
> - Put a breakpoint and view the example class and logical check this
> against
> the query map in your xml.
> 
> This should make it fairly clear from this what is wrong.
> 
> Kind Regards
>  Meindert
> 
> -----Original Message-----
> From: TarakBhandary [mailto:reach2tarak@gmail.com] 
> Sent: 19 March 2009 11:10 AM
> To: user-java@ibatis.apache.org
> Subject: Re: need createCriteria help
> 
> 
> Look its not possible to post all the pages. I have post the listAll
> method
> where I am trying to get the result as the sql query. I will post the
> source
> code if it is in one page, but its linked in so many pages. So it is not
> possible at this moment. 
> 
> 
> Kengkaj Sathianpantarit wrote:
>> 
>> I haven't tried the Example class because I don't have source codes.
>> 
>> As you said you did according to the doc, can you post source codes, and
>> XML
>> mapping?
>> 
>> Kengkaj
>> 
>> On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary
>> <re...@gmail.com>wrote:
>> 
>>>
>>> I read the doc but that is not enough for me. Actually I am done
>>> according
>>> to
>>> the doc but still getting my required result. Thats why i need ur help.
>>> I
>>> dont understand why i am not getting my desire result.
>>>
>>> Do u ever tried this example class. I mean example.createCriteria()....?
>>> if yes then tell me where was i am going wrong.
>>>
>>>
>>> TarakBhandary wrote:
>>> >
>>> > Are you mocking me......................?? Its sounds like that.
>>> > Anyways thanks for the link...............
>>> >
>>> >
>>> > Kengkaj Sathianpantarit wrote:
>>> >>
>>> >> You can download dev guide from the link as follows.
>>> >> http://ibatis.apache.org/onlinehelp.html
>>> >>
>>> >> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
>>> >> right.
>>> >>
>>> >> Kengkaj
>>> >>
>>> >> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
>>> >> <re...@gmail.com>wrote:
>>> >>
>>> >>>
>>> >>> Actually i dont have enough knowledge in this pls help me out i have
>>> to
>>> >>> do
>>> >>> the job as soon as possible.
>>> >>> If there is any link which will help me out pls provide.
>>> >>>
>>> >>>
>>> >>> Kengkaj Sathianpantarit wrote:
>>> >>> >
>>> >>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>>> >>> >
>>> >>> > Kengkaj
>>> >>> >
>>> >>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>>> >>> > <re...@gmail.com>wrote:
>>> >>> >
>>> >>> >>
>>> >>> >> I am not getting the required result from the following, will
>>> anybody
>>> >>> >> help
>>> >>> >> me
>>> >>> >> out............
>>> >>> >>
>>> >>> >> public List listAll(){
>>> >>> >>
>>> >>> >>        ContactInfoExample example = new ContactInfoExample();
>>> >>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>>> >>> >>        return contactInfoDAO.selectByExample(example);
>>> >>> >>     }
>>> >>> >> --
>>> >>> >> View this message in context:
>>> >>> >>
>>> >>>
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>>> >>> >> Sent from the iBATIS - User - Java mailing list archive at
>>> >>> Nabble.com.
>>> >>> >>
>>> >>> >>
>>> >>> >
>>> >>> >
>>> >>>
>>> >>> --
>>> >>> View this message in context:
>>> >>>
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>>> >>> Sent from the iBATIS - User - Java mailing list archive at
>>> Nabble.com.
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/need-createCriteria-help-tp22594367p22595554.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date: 03/17/09
> 16:25:00
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/need-createCriteria-help-tp22594367p22596627.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


RE: need createCriteria help

Posted by meindert <me...@eduflex.com>.
Hi tarak,

It's probably the quickest to debug yourself;
- What is wrong in the result set?
- Did you get log4j working, and do you see the generated query?
==> What is wrong with the generated query?
- Put a breakpoint and view the example class and logical check this against
the query map in your xml.

This should make it fairly clear from this what is wrong.

Kind Regards
 Meindert

-----Original Message-----
From: TarakBhandary [mailto:reach2tarak@gmail.com] 
Sent: 19 March 2009 11:10 AM
To: user-java@ibatis.apache.org
Subject: Re: need createCriteria help


Look its not possible to post all the pages. I have post the listAll method
where I am trying to get the result as the sql query. I will post the source
code if it is in one page, but its linked in so many pages. So it is not
possible at this moment. 


Kengkaj Sathianpantarit wrote:
> 
> I haven't tried the Example class because I don't have source codes.
> 
> As you said you did according to the doc, can you post source codes, and
> XML
> mapping?
> 
> Kengkaj
> 
> On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary
> <re...@gmail.com>wrote:
> 
>>
>> I read the doc but that is not enough for me. Actually I am done
>> according
>> to
>> the doc but still getting my required result. Thats why i need ur help. I
>> dont understand why i am not getting my desire result.
>>
>> Do u ever tried this example class. I mean example.createCriteria()....?
>> if yes then tell me where was i am going wrong.
>>
>>
>> TarakBhandary wrote:
>> >
>> > Are you mocking me......................?? Its sounds like that.
>> > Anyways thanks for the link...............
>> >
>> >
>> > Kengkaj Sathianpantarit wrote:
>> >>
>> >> You can download dev guide from the link as follows.
>> >> http://ibatis.apache.org/onlinehelp.html
>> >>
>> >> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
>> >> right.
>> >>
>> >> Kengkaj
>> >>
>> >> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
>> >> <re...@gmail.com>wrote:
>> >>
>> >>>
>> >>> Actually i dont have enough knowledge in this pls help me out i have
>> to
>> >>> do
>> >>> the job as soon as possible.
>> >>> If there is any link which will help me out pls provide.
>> >>>
>> >>>
>> >>> Kengkaj Sathianpantarit wrote:
>> >>> >
>> >>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>> >>> >
>> >>> > Kengkaj
>> >>> >
>> >>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>> >>> > <re...@gmail.com>wrote:
>> >>> >
>> >>> >>
>> >>> >> I am not getting the required result from the following, will
>> anybody
>> >>> >> help
>> >>> >> me
>> >>> >> out............
>> >>> >>
>> >>> >> public List listAll(){
>> >>> >>
>> >>> >>        ContactInfoExample example = new ContactInfoExample();
>> >>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>> >>> >>        return contactInfoDAO.selectByExample(example);
>> >>> >>     }
>> >>> >> --
>> >>> >> View this message in context:
>> >>> >>
>> >>>
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>> >>> >> Sent from the iBATIS - User - Java mailing list archive at
>> >>> Nabble.com.
>> >>> >>
>> >>> >>
>> >>> >
>> >>> >
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>> >>> Sent from the iBATIS - User - Java mailing list archive at
>> Nabble.com.
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context:
http://www.nabble.com/need-createCriteria-help-tp22594367p22595554.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.238 / Virus Database: 270.11.18/2008 - Release Date: 03/17/09
16:25:00


Re: need createCriteria help

Posted by TarakBhandary <re...@gmail.com>.
Look its not possible to post all the pages. I have post the listAll method
where I am trying to get the result as the sql query. I will post the source
code if it is in one page, but its linked in so many pages. So it is not
possible at this moment. 


Kengkaj Sathianpantarit wrote:
> 
> I haven't tried the Example class because I don't have source codes.
> 
> As you said you did according to the doc, can you post source codes, and
> XML
> mapping?
> 
> Kengkaj
> 
> On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary
> <re...@gmail.com>wrote:
> 
>>
>> I read the doc but that is not enough for me. Actually I am done
>> according
>> to
>> the doc but still getting my required result. Thats why i need ur help. I
>> dont understand why i am not getting my desire result.
>>
>> Do u ever tried this example class. I mean example.createCriteria()....?
>> if yes then tell me where was i am going wrong.
>>
>>
>> TarakBhandary wrote:
>> >
>> > Are you mocking me......................?? Its sounds like that.
>> > Anyways thanks for the link...............
>> >
>> >
>> > Kengkaj Sathianpantarit wrote:
>> >>
>> >> You can download dev guide from the link as follows.
>> >> http://ibatis.apache.org/onlinehelp.html
>> >>
>> >> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
>> >> right.
>> >>
>> >> Kengkaj
>> >>
>> >> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
>> >> <re...@gmail.com>wrote:
>> >>
>> >>>
>> >>> Actually i dont have enough knowledge in this pls help me out i have
>> to
>> >>> do
>> >>> the job as soon as possible.
>> >>> If there is any link which will help me out pls provide.
>> >>>
>> >>>
>> >>> Kengkaj Sathianpantarit wrote:
>> >>> >
>> >>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>> >>> >
>> >>> > Kengkaj
>> >>> >
>> >>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>> >>> > <re...@gmail.com>wrote:
>> >>> >
>> >>> >>
>> >>> >> I am not getting the required result from the following, will
>> anybody
>> >>> >> help
>> >>> >> me
>> >>> >> out............
>> >>> >>
>> >>> >> public List listAll(){
>> >>> >>
>> >>> >>        ContactInfoExample example = new ContactInfoExample();
>> >>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>> >>> >>        return contactInfoDAO.selectByExample(example);
>> >>> >>     }
>> >>> >> --
>> >>> >> View this message in context:
>> >>> >>
>> >>>
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>> >>> >> Sent from the iBATIS - User - Java mailing list archive at
>> >>> Nabble.com.
>> >>> >>
>> >>> >>
>> >>> >
>> >>> >
>> >>>
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>> >>> Sent from the iBATIS - User - Java mailing list archive at
>> Nabble.com.
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/need-createCriteria-help-tp22594367p22595554.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: need createCriteria help

Posted by Kengkaj Sathianpantarit <ke...@gmail.com>.
I haven't tried the Example class because I don't have source codes.

As you said you did according to the doc, can you post source codes, and XML
mapping?

Kengkaj

On Thu, Mar 19, 2009 at 2:13 PM, TarakBhandary <re...@gmail.com>wrote:

>
> I read the doc but that is not enough for me. Actually I am done according
> to
> the doc but still getting my required result. Thats why i need ur help. I
> dont understand why i am not getting my desire result.
>
> Do u ever tried this example class. I mean example.createCriteria()....?
> if yes then tell me where was i am going wrong.
>
>
> TarakBhandary wrote:
> >
> > Are you mocking me......................?? Its sounds like that.
> > Anyways thanks for the link...............
> >
> >
> > Kengkaj Sathianpantarit wrote:
> >>
> >> You can download dev guide from the link as follows.
> >> http://ibatis.apache.org/onlinehelp.html
> >>
> >> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
> >> right.
> >>
> >> Kengkaj
> >>
> >> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
> >> <re...@gmail.com>wrote:
> >>
> >>>
> >>> Actually i dont have enough knowledge in this pls help me out i have to
> >>> do
> >>> the job as soon as possible.
> >>> If there is any link which will help me out pls provide.
> >>>
> >>>
> >>> Kengkaj Sathianpantarit wrote:
> >>> >
> >>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
> >>> >
> >>> > Kengkaj
> >>> >
> >>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
> >>> > <re...@gmail.com>wrote:
> >>> >
> >>> >>
> >>> >> I am not getting the required result from the following, will
> anybody
> >>> >> help
> >>> >> me
> >>> >> out............
> >>> >>
> >>> >> public List listAll(){
> >>> >>
> >>> >>        ContactInfoExample example = new ContactInfoExample();
> >>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
> >>> >>        return contactInfoDAO.selectByExample(example);
> >>> >>     }
> >>> >> --
> >>> >> View this message in context:
> >>> >>
> >>>
> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
> >>> >> Sent from the iBATIS - User - Java mailing list archive at
> >>> Nabble.com.
> >>> >>
> >>> >>
> >>> >
> >>> >
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
> >>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Re: need createCriteria help

Posted by TarakBhandary <re...@gmail.com>.
I read the doc but that is not enough for me. Actually I am done according to
the doc but still getting my required result. Thats why i need ur help. I
dont understand why i am not getting my desire result.

Do u ever tried this example class. I mean example.createCriteria()....?
if yes then tell me where was i am going wrong.


TarakBhandary wrote:
> 
> Are you mocking me......................?? Its sounds like that.
> Anyways thanks for the link...............
> 
> 
> Kengkaj Sathianpantarit wrote:
>> 
>> You can download dev guide from the link as follows.
>> http://ibatis.apache.org/onlinehelp.html
>> 
>> Don't hurry, actually you don't "have to" do the job ASAP :). Do it
>> right.
>> 
>> Kengkaj
>> 
>> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
>> <re...@gmail.com>wrote:
>> 
>>>
>>> Actually i dont have enough knowledge in this pls help me out i have to
>>> do
>>> the job as soon as possible.
>>> If there is any link which will help me out pls provide.
>>>
>>>
>>> Kengkaj Sathianpantarit wrote:
>>> >
>>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>>> >
>>> > Kengkaj
>>> >
>>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>>> > <re...@gmail.com>wrote:
>>> >
>>> >>
>>> >> I am not getting the required result from the following, will anybody
>>> >> help
>>> >> me
>>> >> out............
>>> >>
>>> >> public List listAll(){
>>> >>
>>> >>        ContactInfoExample example = new ContactInfoExample();
>>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>>> >>        return contactInfoDAO.selectByExample(example);
>>> >>     }
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>>> >> Sent from the iBATIS - User - Java mailing list archive at
>>> Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/need-createCriteria-help-tp22594367p22594759.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: need createCriteria help

Posted by TarakBhandary <re...@gmail.com>.
Are you mocking me......................?? Its sounds like that.
Anyways thanks for the link...............


Kengkaj Sathianpantarit wrote:
> 
> You can download dev guide from the link as follows.
> http://ibatis.apache.org/onlinehelp.html
> 
> Don't hurry, actually you don't "have to" do the job ASAP :). Do it right.
> 
> Kengkaj
> 
> On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary
> <re...@gmail.com>wrote:
> 
>>
>> Actually i dont have enough knowledge in this pls help me out i have to
>> do
>> the job as soon as possible.
>> If there is any link which will help me out pls provide.
>>
>>
>> Kengkaj Sathianpantarit wrote:
>> >
>> > Have you used Dynamic Mapped Statements? Read Developer Guide.
>> >
>> > Kengkaj
>> >
>> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
>> > <re...@gmail.com>wrote:
>> >
>> >>
>> >> I am not getting the required result from the following, will anybody
>> >> help
>> >> me
>> >> out............
>> >>
>> >> public List listAll(){
>> >>
>> >>        ContactInfoExample example = new ContactInfoExample();
>> >>        example.createCriteria().andIdContactInfoEqualTo(24);
>> >>        return contactInfoDAO.selectByExample(example);
>> >>     }
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>> >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/need-createCriteria-help-tp22594367p22594612.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: need createCriteria help

Posted by Kengkaj Sathianpantarit <ke...@gmail.com>.
You can download dev guide from the link as follows.
http://ibatis.apache.org/onlinehelp.html

Don't hurry, actually you don't "have to" do the job ASAP :). Do it right.

Kengkaj

On Thu, Mar 19, 2009 at 1:42 PM, TarakBhandary <re...@gmail.com>wrote:

>
> Actually i dont have enough knowledge in this pls help me out i have to do
> the job as soon as possible.
> If there is any link which will help me out pls provide.
>
>
> Kengkaj Sathianpantarit wrote:
> >
> > Have you used Dynamic Mapped Statements? Read Developer Guide.
> >
> > Kengkaj
> >
> > On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
> > <re...@gmail.com>wrote:
> >
> >>
> >> I am not getting the required result from the following, will anybody
> >> help
> >> me
> >> out............
> >>
> >> public List listAll(){
> >>
> >>        ContactInfoExample example = new ContactInfoExample();
> >>        example.createCriteria().andIdContactInfoEqualTo(24);
> >>        return contactInfoDAO.selectByExample(example);
> >>     }
> >> --
> >> View this message in context:
> >> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
> >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>

Re: need createCriteria help

Posted by TarakBhandary <re...@gmail.com>.
Actually i dont have enough knowledge in this pls help me out i have to do
the job as soon as possible.
If there is any link which will help me out pls provide.


Kengkaj Sathianpantarit wrote:
> 
> Have you used Dynamic Mapped Statements? Read Developer Guide.
> 
> Kengkaj
> 
> On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary
> <re...@gmail.com>wrote:
> 
>>
>> I am not getting the required result from the following, will anybody
>> help
>> me
>> out............
>>
>> public List listAll(){
>>
>>        ContactInfoExample example = new ContactInfoExample();
>>        example.createCriteria().andIdContactInfoEqualTo(24);
>>        return contactInfoDAO.selectByExample(example);
>>     }
>> --
>> View this message in context:
>> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
>> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/need-createCriteria-help-tp22594367p22594491.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Re: need createCriteria help

Posted by Kengkaj Sathianpantarit <ke...@gmail.com>.
Have you used Dynamic Mapped Statements? Read Developer Guide.

Kengkaj

On Thu, Mar 19, 2009 at 1:25 PM, TarakBhandary <re...@gmail.com>wrote:

>
> I am not getting the required result from the following, will anybody help
> me
> out............
>
> public List listAll(){
>
>        ContactInfoExample example = new ContactInfoExample();
>        example.createCriteria().andIdContactInfoEqualTo(24);
>        return contactInfoDAO.selectByExample(example);
>     }
> --
> View this message in context:
> http://www.nabble.com/need-createCriteria-help-tp22594367p22594367.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>