| PHOCOA User Guide | ||
|---|---|---|
| Prev | ||
PHOCOA is designed to use Propel as an analog for Core Data. By making a 1-line change to the Propel code, your Propel objects will automatically be Key-Value Coding compliant, making it very simple to make your PHOCOA application interact with Propel.
To update your Propel to work with Phocoa, simply edit the propel/om/BaseObject.php file to make the Propel BaseObject a subclass of the PHOCOA WFObject base class:
abstract class BaseObject extends WFObject {If you also want to use Key-Value Coding methods with the Peer classes, you will need to make 2 additional edits. First, edit the BasePeer object simlarly to BaseObject:
class BasePeer extends WFObjectNext,
add the following attribute to the database tag
schema.xml:basePeer="BasePeer "Notice the SPACE at the end of BasePeer. This is a necessary trick with Propel 1.3, as if the basePeer is "BasePeer" the build scripts don't have Base<Object>Peer extend anything.
That's it! Your Propel install is now fully compatible with PHOCOA to act as the data store for your objects.