Re: [castor-dev] Castor JDO & Stored Procedures
Mad, feel free to ask any questions if you need any help with the code base or similar. Thanks Werner madhavi latha wrote: > Thanks a lot for the reply Werner. I will work on it > then. > > Thanks again > Mad > > --- Werner Guttmann <[EMAIL PROTECTED]> wrote: > >> Madhavi, >> >> Yes, you can, but for SELECT statements only. At the >> moment, there's no support for using stored >> procedures for insert/update statements (like >> Hibernate does), but as far as I rememeber, there's >> already a feature request asking for this feature to >> be added to Castor JDO. Unfortunately, due to the >> imminent 1.0 release (I'll be shipping 1.0M3 >> tonight), this has been back-prioritized to some >> degree. >> >> Having said that, you are always welcome to provide >> us with a(n initial) patch as a donation ;-). >> >> I hope this clarifies some of your questions. >> Thanks >> Werner >> >>> -Original Message----- >>> From: madhavi latha [mailto:[EMAIL PROTECTED] >>> Sent: Dienstag, 07. März 2006 15:28 >>> To: [email protected] >>> Subject: Re: [castor-dev] Castor JDO & Stored >> Procedures >>> Thanks Werner for the quick reply! >>> >>> Well I am working on a module which has a lot of >> existing >>> stored procedures so I thought if I could call >> them then >>> Castor-JDO would have been very neat aproach. So >> how can I >>> solve this issue with castor JDO or do I have to >> use JDBC >>> only. Could you please explain why we can't use >> castor for >>> loading/update.Can I make any native calls using >> Castor JDO >>> like the hibernate for using the existing stored >> procedure.. >>> Please suggest. >>> >>> Thanks in advance. >>> Mad >>> >>> --- Werner Guttmann <[EMAIL PROTECTED]> >> wrote: >>>> Hi, >>>> >>>> I guess what I have not mentioned so far is that >> you cannot >>> use stored >>>> procedures for create/update statements with >> Castor JDO, >>> only for load >>>> statements. I guess I should have mentioned this >> earlier. >>>> Regards >>>> Werner Guttmann >>>> >>>> madhavi latha wrote: >>>>> Hi Werner Guttmann, >>>>> >>>>> Thanks a lot for the reply. >>>>> >>>>> I have one question on the following code. >>>>> oql = _db.getOQLQuery( "CALL >>>>> proc_check_permissions($,$) AS jdo.TestObject" >> ); >>>>> I understand that here we are calling the >> proc_check_permissions >>>>> stored procedure and the >>>> return >>>>> value we are getting in jdo.TestObject. And we >>>> have >>>>> the mapping of jdo.TestObject to a table >>>> test_table in >>>>> the mapping.xml. >>>>> >>>>> I my case I do pass in the values to the >> stored procedure and stp >>>>> returns 2 values which are just >>>> some >>>>> status value and not a part of any table in >> db. So >>>> in >>>>> my case jdo.TestObject class will have state1 >> and >>>>> state2 as fields and I am not sure to which >> table shall I >>> map it in >>>>> the mapping.xml. And without >>>> mapping >>>>> I get an exception : >>>>> org.exolab.castor.jdo.QueryException: Could >> not >>>> find >>>>> an engine supporting class >>>>> >>>>> Please suggest.Any help is appreciated >>>>> >>>>> Thanks in advance. >>>>> Mad >>>>> >>>>> >>>>> --- Werner Guttmann <[EMAIL PROTECTED]> >>>> wrote: >>>>>> Hi Mad, >>>>>> >>>>>> the following link >>>>>> >>>>>> > http://cvs.castor.codehaus.org/viewrep/castor/castor/src/tests >>> /jdo/StoredProcedure.java?r=1.5 >>>>>> shows you a working example on how to call a >>>> stored >>>>>> procedure. This >>>>>> code, by the way, is taken from one of the >>>> existing >>>>>> Castor JDO >>>>>> functional tests in the src/tests directory. >>>&
RE: [castor-dev] Castor JDO & Stored Procedures
Thanks a lot for the reply Werner. I will work on it then. Thanks again Mad --- Werner Guttmann <[EMAIL PROTECTED]> wrote: > Madhavi, > > Yes, you can, but for SELECT statements only. At the > moment, there's no support for using stored > procedures for insert/update statements (like > Hibernate does), but as far as I rememeber, there's > already a feature request asking for this feature to > be added to Castor JDO. Unfortunately, due to the > imminent 1.0 release (I'll be shipping 1.0M3 > tonight), this has been back-prioritized to some > degree. > > Having said that, you are always welcome to provide > us with a(n initial) patch as a donation ;-). > > I hope this clarifies some of your questions. > Thanks > Werner > > > -Original Message- > > From: madhavi latha [mailto:[EMAIL PROTECTED] > > Sent: Dienstag, 07. März 2006 15:28 > > To: [email protected] > > Subject: Re: [castor-dev] Castor JDO & Stored > Procedures > > > > Thanks Werner for the quick reply! > > > > Well I am working on a module which has a lot of > existing > > stored procedures so I thought if I could call > them then > > Castor-JDO would have been very neat aproach. So > how can I > > solve this issue with castor JDO or do I have to > use JDBC > > only. Could you please explain why we can't use > castor for > > loading/update.Can I make any native calls using > Castor JDO > > like the hibernate for using the existing stored > procedure.. > > Please suggest. > > > > Thanks in advance. > > Mad > > > > --- Werner Guttmann <[EMAIL PROTECTED]> > wrote: > > > > > Hi, > > > > > > I guess what I have not mentioned so far is that > you cannot > > use stored > > > procedures for create/update statements with > Castor JDO, > > only for load > > > statements. I guess I should have mentioned this > earlier. > > > > > > Regards > > > Werner Guttmann > > > > > > madhavi latha wrote: > > > > Hi Werner Guttmann, > > > > > > > > Thanks a lot for the reply. > > > > > > > > I have one question on the following code. > > > > oql = _db.getOQLQuery( "CALL > > > > proc_check_permissions($,$) AS jdo.TestObject" > ); > > > > > > > > I understand that here we are calling the > proc_check_permissions > > > > stored procedure and the > > > return > > > > value we are getting in jdo.TestObject. And we > > > have > > > > the mapping of jdo.TestObject to a table > > > test_table in > > > > the mapping.xml. > > > > > > > > I my case I do pass in the values to the > stored procedure and stp > > > > returns 2 values which are just > > > some > > > > status value and not a part of any table in > db. So > > > in > > > > my case jdo.TestObject class will have state1 > and > > > > state2 as fields and I am not sure to which > table shall I > > map it in > > > > the mapping.xml. And without > > > mapping > > > > I get an exception : > > > > org.exolab.castor.jdo.QueryException: Could > not > > > find > > > > an engine supporting class > > > > > > > > Please suggest.Any help is appreciated > > > > > > > > Thanks in advance. > > > > Mad > > > > > > > > > > > > --- Werner Guttmann <[EMAIL PROTECTED]> > > > wrote: > > > > > > > >> Hi Mad, > > > >> > > > >> the following link > > > >> > > > >> > > > > > > > > > > http://cvs.castor.codehaus.org/viewrep/castor/castor/src/tests > > /jdo/StoredProcedure.java?r=1.5 > > > >> shows you a working example on how to call a > > > stored > > > >> procedure. This > > > >> code, by the way, is taken from one of the > > > existing > > > >> Castor JDO > > > >> functional tests in the src/tests directory. > > > >> > > > >> Regards > > > >> Werner Guttmann > > > >> > > > >> madhavi latha wrote: > > > >>> Hello All, > > > >>> > > > >&g
RE: [castor-dev] Castor JDO & Stored Procedures
Madhavi, Yes, you can, but for SELECT statements only. At the moment, there's no support for using stored procedures for insert/update statements (like Hibernate does), but as far as I rememeber, there's already a feature request asking for this feature to be added to Castor JDO. Unfortunately, due to the imminent 1.0 release (I'll be shipping 1.0M3 tonight), this has been back-prioritized to some degree. Having said that, you are always welcome to provide us with a(n initial) patch as a donation ;-). I hope this clarifies some of your questions. Thanks Werner > -Original Message- > From: madhavi latha [mailto:[EMAIL PROTECTED] > Sent: Dienstag, 07. März 2006 15:28 > To: [email protected] > Subject: Re: [castor-dev] Castor JDO & Stored Procedures > > Thanks Werner for the quick reply! > > Well I am working on a module which has a lot of existing > stored procedures so I thought if I could call them then > Castor-JDO would have been very neat aproach. So how can I > solve this issue with castor JDO or do I have to use JDBC > only. Could you please explain why we can't use castor for > loading/update.Can I make any native calls using Castor JDO > like the hibernate for using the existing stored procedure.. > Please suggest. > > Thanks in advance. > Mad > > --- Werner Guttmann <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I guess what I have not mentioned so far is that you cannot > use stored > > procedures for create/update statements with Castor JDO, > only for load > > statements. I guess I should have mentioned this earlier. > > > > Regards > > Werner Guttmann > > > > madhavi latha wrote: > > > Hi Werner Guttmann, > > > > > > Thanks a lot for the reply. > > > > > > I have one question on the following code. > > > oql = _db.getOQLQuery( "CALL > > > proc_check_permissions($,$) AS jdo.TestObject" ); > > > > > > I understand that here we are calling the proc_check_permissions > > > stored procedure and the > > return > > > value we are getting in jdo.TestObject. And we > > have > > > the mapping of jdo.TestObject to a table > > test_table in > > > the mapping.xml. > > > > > > I my case I do pass in the values to the stored procedure and stp > > > returns 2 values which are just > > some > > > status value and not a part of any table in db. So > > in > > > my case jdo.TestObject class will have state1 and > > > state2 as fields and I am not sure to which table shall I > map it in > > > the mapping.xml. And without > > mapping > > > I get an exception : > > > org.exolab.castor.jdo.QueryException: Could not > > find > > > an engine supporting class > > > > > > Please suggest.Any help is appreciated > > > > > > Thanks in advance. > > > Mad > > > > > > > > > --- Werner Guttmann <[EMAIL PROTECTED]> > > wrote: > > > > > >> Hi Mad, > > >> > > >> the following link > > >> > > >> > > > > > > http://cvs.castor.codehaus.org/viewrep/castor/castor/src/tests > /jdo/StoredProcedure.java?r=1.5 > > >> shows you a working example on how to call a > > stored > > >> procedure. This > > >> code, by the way, is taken from one of the > > existing > > >> Castor JDO > > >> functional tests in the src/tests directory. > > >> > > >> Regards > > >> Werner Guttmann > > >> > > >> madhavi latha wrote: > > >>> Hello All, > > >>> > > >>> I want to call the Stored Procedure from Castor > > >> JDO > > >>> but didn't find much help anywhere for the same. > > >>> Please let me know if there is any documentation > > >> or > > >>> examples available.. > > >>> > > >>> In the castor site it says to use: > > >>> oql = db.getOQLQuery("CALL sp_something($) AS myapp.Product"); > > >>> > > >>> Now I have IN and OUT parameters, do I need to > > >> send > > >>> all the IN parameters at ($) with comma... > > >>> and receive the OUT parameters from > > myapp.Product > > >> (or > > >>> equivalent pojo file)... > > >>> > > >>> Any help is greatly Apprecia
Re: [castor-dev] Castor JDO & Stored Procedures
Thanks Werner for the quick reply!
Well I am working on a module which has a lot of
existing stored procedures so I thought if I could
call them then Castor-JDO would have been very neat
aproach. So how can I solve this issue with castor JDO
or do I have to use JDBC only. Could you please
explain why we can't use castor for loading/update.Can
I make any native calls using Castor JDO like the
hibernate for using the existing stored procedure..
Please suggest.
Thanks in advance.
Mad
--- Werner Guttmann <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I guess what I have not mentioned so far is that you
> cannot use stored
> procedures for create/update statements with Castor
> JDO, only for load
> statements. I guess I should have mentioned this
> earlier.
>
> Regards
> Werner Guttmann
>
> madhavi latha wrote:
> > Hi Werner Guttmann,
> >
> > Thanks a lot for the reply.
> >
> > I have one question on the following code.
> > oql = _db.getOQLQuery( "CALL
> > proc_check_permissions($,$) AS jdo.TestObject" );
> >
> > I understand that here we are calling the
> > proc_check_permissions stored procedure and the
> return
> > value we are getting in jdo.TestObject. And we
> have
> > the mapping of jdo.TestObject to a table
> test_table in
> > the mapping.xml.
> >
> > I my case I do pass in the values to the stored
> > procedure and stp returns 2 values which are just
> some
> > status value and not a part of any table in db. So
> in
> > my case jdo.TestObject class will have state1 and
> > state2 as fields and I am not sure to which table
> > shall I map it in the mapping.xml. And without
> mapping
> > I get an exception :
> > org.exolab.castor.jdo.QueryException: Could not
> find
> > an engine supporting class
> >
> > Please suggest.Any help is appreciated
> >
> > Thanks in advance.
> > Mad
> >
> >
> > --- Werner Guttmann <[EMAIL PROTECTED]>
> wrote:
> >
> >> Hi Mad,
> >>
> >> the following link
> >>
> >>
> >
>
http://cvs.castor.codehaus.org/viewrep/castor/castor/src/tests/jdo/StoredProcedure.java?r=1.5
> >> shows you a working example on how to call a
> stored
> >> procedure. This
> >> code, by the way, is taken from one of the
> existing
> >> Castor JDO
> >> functional tests in the src/tests directory.
> >>
> >> Regards
> >> Werner Guttmann
> >>
> >> madhavi latha wrote:
> >>> Hello All,
> >>>
> >>> I want to call the Stored Procedure from Castor
> >> JDO
> >>> but didn't find much help anywhere for the same.
> >>> Please let me know if there is any documentation
> >> or
> >>> examples available..
> >>>
> >>> In the castor site it says to use:
> >>> oql = db.getOQLQuery("CALL sp_something($) AS
> >>> myapp.Product");
> >>>
> >>> Now I have IN and OUT parameters, do I need to
> >> send
> >>> all the IN parameters at ($) with comma...
> >>> and receive the OUT parameters from
> myapp.Product
> >> (or
> >>> equivalent pojo file)...
> >>>
> >>> Any help is greatly Appreciated ...
> >>>
> >>> Thanks in advance!!!
> >>> Mad
> >>>
> >>>
> __
> >>> Do You Yahoo!?
> >>> Tired of spam? Yahoo! Mail has the best spam
> >> protection around
> >>> http://mail.yahoo.com
> >>>
> >>>
> -
> >>> If you wish to unsubscribe from this list,
> please
> >>> send an empty message to the following address:
> >>>
> >>> [EMAIL PROTECTED]
> >>>
> -
> >>>
> >>>
> >>
> >> -
> >> If you wish to unsubscribe from this list, please
>
> >> send an empty message to the following address:
> >>
> >> [EMAIL PROTECTED]
> >> -
> >>
> >>
> >
> >
> > __
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> > -
> > If you wish to unsubscribe from this list, please
> > send an empty message to the following address:
> >
> > [EMAIL PROTECTED]
> > -
> >
> >
>
>
> -
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -
>
>
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-
Re: [castor-dev] Castor JDO & Stored Procedures
Hi,
I guess what I have not mentioned so far is that you cannot use stored
procedures for create/update statements with Castor JDO, only for load
statements. I guess I should have mentioned this earlier.
Regards
Werner Guttmann
madhavi latha wrote:
> Hi Werner Guttmann,
>
> Thanks a lot for the reply.
>
> I have one question on the following code.
> oql = _db.getOQLQuery( "CALL
> proc_check_permissions($,$) AS jdo.TestObject" );
>
> I understand that here we are calling the
> proc_check_permissions stored procedure and the return
> value we are getting in jdo.TestObject. And we have
> the mapping of jdo.TestObject to a table test_table in
> the mapping.xml.
>
> I my case I do pass in the values to the stored
> procedure and stp returns 2 values which are just some
> status value and not a part of any table in db. So in
> my case jdo.TestObject class will have state1 and
> state2 as fields and I am not sure to which table
> shall I map it in the mapping.xml. And without mapping
> I get an exception :
> org.exolab.castor.jdo.QueryException: Could not find
> an engine supporting class
>
> Please suggest.Any help is appreciated
>
> Thanks in advance.
> Mad
>
>
> --- Werner Guttmann <[EMAIL PROTECTED]> wrote:
>
>> Hi Mad,
>>
>> the following link
>>
>>
> http://cvs.castor.codehaus.org/viewrep/castor/castor/src/tests/jdo/StoredProcedure.java?r=1.5
>> shows you a working example on how to call a stored
>> procedure. This
>> code, by the way, is taken from one of the existing
>> Castor JDO
>> functional tests in the src/tests directory.
>>
>> Regards
>> Werner Guttmann
>>
>> madhavi latha wrote:
>>> Hello All,
>>>
>>> I want to call the Stored Procedure from Castor
>> JDO
>>> but didn't find much help anywhere for the same.
>>> Please let me know if there is any documentation
>> or
>>> examples available..
>>>
>>> In the castor site it says to use:
>>> oql = db.getOQLQuery("CALL sp_something($) AS
>>> myapp.Product");
>>>
>>> Now I have IN and OUT parameters, do I need to
>> send
>>> all the IN parameters at ($) with comma...
>>> and receive the OUT parameters from myapp.Product
>> (or
>>> equivalent pojo file)...
>>>
>>> Any help is greatly Appreciated ...
>>>
>>> Thanks in advance!!!
>>> Mad
>>>
>>> __
>>> Do You Yahoo!?
>>> Tired of spam? Yahoo! Mail has the best spam
>> protection around
>>> http://mail.yahoo.com
>>>
>>> -
>>> If you wish to unsubscribe from this list, please
>>> send an empty message to the following address:
>>>
>>> [EMAIL PROTECTED]
>>> -
>>>
>>>
>>
>> -
>> If you wish to unsubscribe from this list, please
>> send an empty message to the following address:
>>
>> [EMAIL PROTECTED]
>> -
>>
>>
>
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -
>
>
-
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-
Re: [castor-dev] Castor JDO & Stored Procedures
Hi Werner Guttmann,
Thanks a lot for the reply.
I have one question on the following code.
oql = _db.getOQLQuery( "CALL
proc_check_permissions($,$) AS jdo.TestObject" );
I understand that here we are calling the
proc_check_permissions stored procedure and the return
value we are getting in jdo.TestObject. And we have
the mapping of jdo.TestObject to a table test_table in
the mapping.xml.
I my case I do pass in the values to the stored
procedure and stp returns 2 values which are just some
status value and not a part of any table in db. So in
my case jdo.TestObject class will have state1 and
state2 as fields and I am not sure to which table
shall I map it in the mapping.xml. And without mapping
I get an exception :
org.exolab.castor.jdo.QueryException: Could not find
an engine supporting class
Please suggest.Any help is appreciated
Thanks in advance.
Mad
--- Werner Guttmann <[EMAIL PROTECTED]> wrote:
> Hi Mad,
>
> the following link
>
>
http://cvs.castor.codehaus.org/viewrep/castor/castor/src/tests/jdo/StoredProcedure.java?r=1.5
>
> shows you a working example on how to call a stored
> procedure. This
> code, by the way, is taken from one of the existing
> Castor JDO
> functional tests in the src/tests directory.
>
> Regards
> Werner Guttmann
>
> madhavi latha wrote:
> > Hello All,
> >
> > I want to call the Stored Procedure from Castor
> JDO
> > but didn't find much help anywhere for the same.
> > Please let me know if there is any documentation
> or
> > examples available..
> >
> > In the castor site it says to use:
> > oql = db.getOQLQuery("CALL sp_something($) AS
> > myapp.Product");
> >
> > Now I have IN and OUT parameters, do I need to
> send
> > all the IN parameters at ($) with comma...
> > and receive the OUT parameters from myapp.Product
> (or
> > equivalent pojo file)...
> >
> > Any help is greatly Appreciated ...
> >
> > Thanks in advance!!!
> > Mad
> >
> > __
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> > -
> > If you wish to unsubscribe from this list, please
> > send an empty message to the following address:
> >
> > [EMAIL PROTECTED]
> > -
> >
> >
>
>
> -
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -
>
>
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-
Re: [castor-dev] Castor JDO & Stored Procedures
Hi Mad,
the following link
http://cvs.castor.codehaus.org/viewrep/castor/castor/src/tests/jdo/StoredProcedure.java?r=1.5
shows you a working example on how to call a stored procedure. This
code, by the way, is taken from one of the existing Castor JDO
functional tests in the src/tests directory.
Regards
Werner Guttmann
madhavi latha wrote:
> Hello All,
>
> I want to call the Stored Procedure from Castor JDO
> but didn't find much help anywhere for the same.
> Please let me know if there is any documentation or
> examples available..
>
> In the castor site it says to use:
> oql = db.getOQLQuery("CALL sp_something($) AS
> myapp.Product");
>
> Now I have IN and OUT parameters, do I need to send
> all the IN parameters at ($) with comma...
> and receive the OUT parameters from myapp.Product (or
> equivalent pojo file)...
>
> Any help is greatly Appreciated ...
>
> Thanks in advance!!!
> Mad
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> -
> If you wish to unsubscribe from this list, please
> send an empty message to the following address:
>
> [EMAIL PROTECTED]
> -
>
>
-
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-

