tags:

views:

30

answers:

1

hi,

I have a project consists of a java and a php application. The java application uses the torque-ORM and the PHP application uses the propel ORM.

I have two schema.xml files for the same database. As far as I know propel is part of torque. Is it posible to use only one schema.xml for both projects?

A: 

Propel is not really a part of Torque, but it is indeed based on it. I haven't looked at the Torque schema reference in detail, but when I compare it to the Propel schema reference, they seem to be very alike, only differing in some attribute names. Maybe you can create one unified schema with all attributes, and then use two XSLT or other transformations to strip out the stuff that is related to the other ORM?

Jan Fabry
I compared the both schema definitions. They are very similar.One difference is the BOOLEAN type. In torque is BOOLEANINT and BOOLEANCHAR. In Propel it is just BOOLEAN.Actually I want to avoid transformations. When I use TINYINT size(1) the setter in Propel is different to the boolean-setter :(any experience?
Uwe
I don't think you can cross this gap without creating a bridge yourself. Torque and Propel each gained new features, and not necessarily the same ones. So either you change the schema, or you modify the code in Propel and/or Torque that read this schema. I think the first thing is much easier.
Jan Fabry