I've just (10 minutes ago) been through this. You need to set 
<type-mapping type="boolean" name="char(1)"/>.

The MySQL online documentation says that "bit" and "bool" gets converted 
to char(1), but in reality they where set to tinyint(1), which Orion for 
some reason could not use. The above solution worked for me.

Regards /Marcus

Roozbeh Ghaffari wrote:
> Dear Michael,
> 
> I have set the schema attribute of my datasource to 
> mysql.xml (which I have written myself). In this
> file I can only set datatype mappings. I can't tell
> Orion what are the literals for True or False.
> 
> tnx,
> Roozbeh/
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On Behalf Of Michael
> Simons
> Sent: Monday, October 01, 2001 11:14 AM
> To: Orion-Interest
> Subject: Re: Problems with CMP/MySQL
> 
> 
> Roozbeh Ghaffari wrote:
> 
> 
>>Hi All,
>>
>> 
>>
>>We use Orion CMP features with MySQL. We had problems with boolean and
>>char fields.
>>
>>I used P6Spy (www.provision6.com <http://www.provision6.com>)  to see
>>SQL commands generated by Orion.
>>
>>Orion says:
>>
>>update table_name set boolean_field = 'true'
>>
>>but MySQL expects
>>
>>update table_name set boolean_field = '1'
>>
>> 
>>
>>How can I ask Orion to generate the expected SQL?
>>
>> 
>>
>>But in case of character field we have a bigger problem.
>>
>>I try to set a character field to 'F' or 'M'
>>
>>Orion says:
>>
>>update table_name set char_field = 0
>>
>>!!!
>>
>>I don't understand what is happening!
>>
>> 
>>
>>Thank you in advance,
>>
>>Roozbeh/
>>
>>
> 
> Sounds like You're missing $ORION_HOME/config/database-schemas/mysql.xml
> 
> michael
> 
> 


-- 
Marcus Ahnve                          email: [EMAIL PROTECTED]
Lecando AB                           Office: +46-(0)8-634 94 18
Sweden                               Mobile: +46-(0)70-462 19 18
www.lecando.com                        ICQ#: 4564879



Reply via email to