You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Kintzel Levente <ki...@codespring.ro> on 2005/08/23 12:50:55 UTC

MEMO = BYTEA ?

Hi!

I want to include in my table a memo field. I use Postgre database. In my schema I specified the type of the field as LONGVARCHAR. In the sql generated by torque, it seems that LONGVARCHAR generates BYTEA.
But with bytea I have some problems with the application.
I use the application on two different machines. One with Suse and one with XP with tomcat 5 and tomcat 4.31. The same application. But the datas enetered in the bytea field from one machine is not seen well on the second machine and vice-versa. The problems appears with UTF and other special characters. It seems that the datas are not seen as the same from the two tomcats. Why appears this problem?
I correct manually, the type of the field from bytea to text... With text field everithing is OK, the problem disappears.
My question is: There is any configuration to assure that the content of the bytea field is sees as the same in the two situations, or there is a posibility to generate postgre text datatype field form schema?
Thank you in advance...

             Regards,
                Levi


Re: MEMO = BYTEA ?

Posted by Kintzel Levente <ki...@codespring.ro>.
Hi!

I used torque 3.0.2.  But thanks for your idea I found the property file 
db.props for postgre and changed the mapping from bytea to text. It works 
now well. But I think that is a better solution to upgrade my torque :). 
Thank you....

       Regards,
           Levi


----- Original Message ----- 
From: "Thomas Fischer" <tf...@apache.org>
To: "Apache Torque Users List" <to...@db.apache.org>
Sent: Friday, August 26, 2005 10:05 AM
Subject: Re: MEMO = BYTEA ?


> Hi,
>
> which Torque version is this ? in 3.2-rc1, I have found
>
> setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "TEXT"));
>
> meaning tha TEXT and not BYTEA is used.
>
>    Thomas
>
> On Tue, 23 Aug 2005, Kintzel Levente wrote:
>
>> Hi!
>>
>> I want to include in my table a memo field. I use Postgre database. In my 
>> schema I specified the type of the field as LONGVARCHAR. In the sql 
>> generated by torque, it seems that LONGVARCHAR generates BYTEA.
>> But with bytea I have some problems with the application.
>> I use the application on two different machines. One with Suse and one 
>> with XP with tomcat 5 and tomcat 4.31. The same application. But the 
>> datas enetered in the bytea field from one machine is not seen well on 
>> the second machine and vice-versa. The problems appears with UTF and 
>> other special characters. It seems that the datas are not seen as the 
>> same from the two tomcats. Why appears this problem?
>> I correct manually, the type of the field from bytea to text... With text 
>> field everithing is OK, the problem disappears.
>> My question is: There is any configuration to assure that the content of 
>> the bytea field is sees as the same in the two situations, or there is a 
>> posibility to generate postgre text datatype field form schema?
>> Thank you in advance...
>>
>>             Regards,
>>                Levi
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: MEMO = BYTEA ?

Posted by Thomas Fischer <tf...@apache.org>.
Hi,

which Torque version is this ? in 3.2-rc1, I have found

setSchemaDomainMapping(new Domain(SchemaType.LONGVARCHAR, "TEXT"));

meaning tha TEXT and not BYTEA is used.

    Thomas

On Tue, 23 Aug 2005, Kintzel Levente wrote:

> Hi!
>
> I want to include in my table a memo field. I use Postgre database. In my schema I specified the type of the field as LONGVARCHAR. In the sql generated by torque, it seems that LONGVARCHAR generates BYTEA.
> But with bytea I have some problems with the application.
> I use the application on two different machines. One with Suse and one with XP with tomcat 5 and tomcat 4.31. The same application. But the datas enetered in the bytea field from one machine is not seen well on the second machine and vice-versa. The problems appears with UTF and other special characters. It seems that the datas are not seen as the same from the two tomcats. Why appears this problem?
> I correct manually, the type of the field from bytea to text... With text field everithing is OK, the problem disappears.
> My question is: There is any configuration to assure that the content of the bytea field is sees as the same in the two situations, or there is a posibility to generate postgre text datatype field form schema?
> Thank you in advance...
>
>             Regards,
>                Levi
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org