You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Patrick Tonidandel <pa...@wuerth.it> on 2001/11/16 16:28:05 UTC

Getting Null values from DB in Torque

Hi there,

I have columns in my Sybase-DB that contain NULL values, and I have to get
them out. The relative column-types are int and byte. Torque transforms this
NULL's in zero. As I can see from other mailings in turbine-dev-list till
now there is no solution to this problem.

At this point, I would like to change the mapping of this columns from
native-type to object-type
(Example from int to Integer and from byte to Byte).

Where have I got to do this modifications?

Any help is very appreciated.

Regards
Patrick Tonidandel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AW: Getting Null values from DB in Torque

Posted by Jason van Zyl <jv...@zenplex.com>.
On 11/16/01 1:17 PM, "John McNally" <jm...@collab.net> wrote:

> jdbc directly.  note this is not going to be an easy task.  i believe
> the removal of village as a dependency has been approved, but you should
> send a note to turbine-dev (and join that list),

I'm working on integrating the bits of village into torque and overap with
what's there and eventually slim it down. This will come after the tests are
complete for what is there already.

> before starting on
> this, as I would hate for me to cause you to waste a lot of time.
> 
> Village is a lightweight wrapper on jdbc that does add some convenience,
> but as the use of village is pretty much completely hidden in the use of
> torque, it does not add much benefit to users.  Some village objects are
> exposed by public methods, however, so we will need to follow a
> deprecation policy.  Which means any changes would not be able to go in
> until after 2.2 is released, unless you were able to provide some
> adapter code to keep the methods functional.
> 
> john mcnally
> 
> Patrick Tonidandel wrote:
>> 
>> Thanks for the fast response.
>> 
>> What about the alternative. What can I use instead of Village?
>> 
>> Regards Patrick
>> 
>> -----Ursprüngliche Nachricht-----
>> Von: jmcnally@wuerth-phoenix.com [mailto:jmcnally@wuerth-phoenix.com]Im
>> Auftrag von John McNally
>> Gesendet: Friday, November 16, 2001 5:35 PM
>> An: Turbine Users List
>> Betreff: Re: Getting Null values from DB in Torque
>> 
>> the easy part is to start with changing the constants in
>> o.a.torque.engine.database.model.TypeMap.  This might lead to some
>> changes needed in torque's src/templates/om/Object.vm and Peer.vm.
>> Finally you will need to update com.workingdogs.village.Value (village
>> api is documented at share.whichever.com) to return object types (in
>> addition to the primitive types it now returns.)  There will probably be
>> a few other classes that need changed in village due to such a change,
>> but i am not sure.  Jon probably will not accept changes to village's
>> api, so you probably would want to check with him, before embarking on
>> such a path.  An alternative is to fix BasePeer to not use village,
>> though preferrably still use the prepared statements that are one
>> benefit village provides.
>> 
>> john mcnally
>> 
>> Patrick Tonidandel wrote:
>>> 
>>> Hi there,
>>> 
>>> I have columns in my Sybase-DB that contain NULL values, and I have to get
>>> them out. The relative column-types are int and byte. Torque transforms
>> this
>>> NULL's in zero. As I can see from other mailings in turbine-dev-list till
>>> now there is no solution to this problem.
>>> 
>>> At this point, I would like to change the mapping of this columns from
>>> native-type to object-type
>>> (Example from int to Integer and from byte to Byte).
>>> 
>>> Where have I got to do this modifications?
>>> 
>>> Any help is very appreciated.
>>> 
>>> Regards
>>> Patrick Tonidandel
>>> 
>>> --
>>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>> 
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>> 
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

-- 

jvz.

Jason van Zyl

http://tambora.zenplex.org
http://jakarta.apache.org/turbine
http://jakarta.apache.org/velocity
http://jakarta.apache.org/alexandria
http://jakarta.apache.org/commons



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: AW: Getting Null values from DB in Torque

Posted by John McNally <jm...@collab.net>.
jdbc directly.  note this is not going to be an easy task.  i believe
the removal of village as a dependency has been approved, but you should
send a note to turbine-dev (and join that list), before starting on
this, as I would hate for me to cause you to waste a lot of time.

Village is a lightweight wrapper on jdbc that does add some convenience,
but as the use of village is pretty much completely hidden in the use of
torque, it does not add much benefit to users.  Some village objects are
exposed by public methods, however, so we will need to follow a
deprecation policy.  Which means any changes would not be able to go in
until after 2.2 is released, unless you were able to provide some
adapter code to keep the methods functional.  

john mcnally

Patrick Tonidandel wrote:
> 
> Thanks for the fast response.
> 
> What about the alternative. What can I use instead of Village?
> 
> Regards Patrick
> 
> -----Ursprüngliche Nachricht-----
> Von: jmcnally@wuerth-phoenix.com [mailto:jmcnally@wuerth-phoenix.com]Im
> Auftrag von John McNally
> Gesendet: Friday, November 16, 2001 5:35 PM
> An: Turbine Users List
> Betreff: Re: Getting Null values from DB in Torque
> 
> the easy part is to start with changing the constants in
> o.a.torque.engine.database.model.TypeMap.  This might lead to some
> changes needed in torque's src/templates/om/Object.vm and Peer.vm.
> Finally you will need to update com.workingdogs.village.Value (village
> api is documented at share.whichever.com) to return object types (in
> addition to the primitive types it now returns.)  There will probably be
> a few other classes that need changed in village due to such a change,
> but i am not sure.  Jon probably will not accept changes to village's
> api, so you probably would want to check with him, before embarking on
> such a path.  An alternative is to fix BasePeer to not use village,
> though preferrably still use the prepared statements that are one
> benefit village provides.
> 
> john mcnally
> 
> Patrick Tonidandel wrote:
> >
> > Hi there,
> >
> > I have columns in my Sybase-DB that contain NULL values, and I have to get
> > them out. The relative column-types are int and byte. Torque transforms
> this
> > NULL's in zero. As I can see from other mailings in turbine-dev-list till
> > now there is no solution to this problem.
> >
> > At this point, I would like to change the mapping of this columns from
> > native-type to object-type
> > (Example from int to Integer and from byte to Byte).
> >
> > Where have I got to do this modifications?
> >
> > Any help is very appreciated.
> >
> > Regards
> > Patrick Tonidandel
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


AW: Getting Null values from DB in Torque

Posted by Patrick Tonidandel <pa...@wuerth.it>.
Thanks for the fast response.

What about the alternative. What can I use instead of Village?

Regards Patrick

-----Ursprüngliche Nachricht-----
Von: jmcnally@wuerth-phoenix.com [mailto:jmcnally@wuerth-phoenix.com]Im
Auftrag von John McNally
Gesendet: Friday, November 16, 2001 5:35 PM
An: Turbine Users List
Betreff: Re: Getting Null values from DB in Torque


the easy part is to start with changing the constants in
o.a.torque.engine.database.model.TypeMap.  This might lead to some
changes needed in torque's src/templates/om/Object.vm and Peer.vm.
Finally you will need to update com.workingdogs.village.Value (village
api is documented at share.whichever.com) to return object types (in
addition to the primitive types it now returns.)  There will probably be
a few other classes that need changed in village due to such a change,
but i am not sure.  Jon probably will not accept changes to village's
api, so you probably would want to check with him, before embarking on
such a path.  An alternative is to fix BasePeer to not use village,
though preferrably still use the prepared statements that are one
benefit village provides.

john mcnally

Patrick Tonidandel wrote:
>
> Hi there,
>
> I have columns in my Sybase-DB that contain NULL values, and I have to get
> them out. The relative column-types are int and byte. Torque transforms
this
> NULL's in zero. As I can see from other mailings in turbine-dev-list till
> now there is no solution to this problem.
>
> At this point, I would like to change the mapping of this columns from
> native-type to object-type
> (Example from int to Integer and from byte to Byte).
>
> Where have I got to do this modifications?
>
> Any help is very appreciated.
>
> Regards
> Patrick Tonidandel
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Getting Null values from DB in Torque

Posted by John McNally <jm...@collab.net>.
the easy part is to start with changing the constants in
o.a.torque.engine.database.model.TypeMap.  This might lead to some
changes needed in torque's src/templates/om/Object.vm and Peer.vm. 
Finally you will need to update com.workingdogs.village.Value (village
api is documented at share.whichever.com) to return object types (in
addition to the primitive types it now returns.)  There will probably be
a few other classes that need changed in village due to such a change,
but i am not sure.  Jon probably will not accept changes to village's
api, so you probably would want to check with him, before embarking on
such a path.  An alternative is to fix BasePeer to not use village,
though preferrably still use the prepared statements that are one
benefit village provides.

john mcnally

Patrick Tonidandel wrote:
> 
> Hi there,
> 
> I have columns in my Sybase-DB that contain NULL values, and I have to get
> them out. The relative column-types are int and byte. Torque transforms this
> NULL's in zero. As I can see from other mailings in turbine-dev-list till
> now there is no solution to this problem.
> 
> At this point, I would like to change the mapping of this columns from
> native-type to object-type
> (Example from int to Integer and from byte to Byte).
> 
> Where have I got to do this modifications?
> 
> Any help is very appreciated.
> 
> Regards
> Patrick Tonidandel
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>