Frequently Asked Questions
This is a work in progress. If you have a question that you think would benefit others using Propel, please add it to the comments and we will address it in this FAQ. If your problem is more of a "why is this breaking?!" issue then you may find your answer in the WTF document.
If you have a question that is not listed here, please consider asking the user mailing-list?.
General
Why are the build.properties and runtime-conf.xml properties separate?
build.properties is where you define generator properties, while the runtime-conf.xml file is where you define runtime-environment properties. Typically these files will contain some duplicate information -- in particular, the database connection information will probably be the same (but it doesn't have to be). The runtime properties file is turned into a multi-dimensional PHP assoc array by a Phing task. The Phing task also adds class mapping information for the Propel autoload mechanism. When you initialize Propel you pass the path to the converted file (by default the converted file is placed in the build/conf directory).
How does Propel handle id generation (like auto-increment)?
Propel supports only native id generation. That means that for MySQL Propel will use AUTO_INCREMENT, IDENTITY() for MS SQL Server, CREATE SEQUENCE ... for PostgreSQL, etc.
Why does Propel use Creole for database reverse-engineering?
Propel still requires Creole for reverse engineering due to Creole's superior metadata support. We plan to replace the Creole dependency with a new tool in-development, LinguaFranca; however, that project is only at beginning stages of development.
Does Propel support Views
Propel handles views like normal tables. But to check if your views are updatable, and not read-only, consult your database documentation.
You will need to define the view yourself (e.g. using a custom SQL file). In your schema.xml, you can create a table that matches your view columns and add skipSql="true" readOnly="true" to prevent Propel from attempting to create the table and from adding save methods to the generated object class.
See also this mailing list post on the topic.
DB-specific Issues
Is a specific MySQL version required?
Propel is designed for MySQL 4.0.x. It works also with the newer 4.1.x and 5.x versions, although it does not take advantage of any of the new features or fixes in this branch (although 5.x views should work). It probably will not work w/o modification with the older 3.x versions.
Do I need to use InnoDB tables with MySQL?
No. We defaulted to InnoDB table types in early Propel release just because these table types offer true foreign key constraints and transaction support. Obviously supporting transactions and fkey constraints has its advantages for Propel, but you are able to use MySQL's native (and faster) MyISAM table types. This is probably a good idea if your application is primarily using Propel for reading data. To change the table type, specify a value for propel.mysql.tableType property in your build.properties file.
Is it possible to use InnoDB and MyISAM within the same database?
No, not currently. I don't know what the limitations are within MySQL in this regard, but Propel implements table type selection as a build property (so there's only one value possible per build).
Do I need to do enclose BLOB/CLOB queries in transactions for PostgreSQL?
No. Propel will automatically start and commit the transaction if you are using PostgreSQL and are performing a query which involves a LOB column.
Does Propel support persistent connections?
Yes, in so much as PDO supports them. You can add any PDO configuration properties to your runtime-conf.xml; however, it is probably worth first checking to make sure that PDO does adequately support the feature you wish to use. We've learned through use and user reports that PDO doesn't always work very consistently ... and, yes, we know that consistency is the whole point of an unified API layer :-)
Does propel support replicated databases between multiple backend DB machines?
Yes, with a little manual work - check the [HowTo section wiki:Documentation/1.3/HowTos].
Does propel is able to generate schema.xml from existing database?
Yes, please read the Existing Databases HowTo.
Is it possible to set the character set or collate for tables?
Yes, please see wiki:Documentation/1.3/RuntimeConf
Customizing Generation
Can I change the way Propel converts my column names to PHP method names and Peer constants?
Yes, see Documentation/1.3/Schema reference, in particular the phpNamingMethod (and defaultPhpNamingMethod) attributes.