|
What is persistency |
Persistency makes objects survive a shutdown of their runtime environment |
It is usually done by storing and retrieving the objects in/from persistent storage. PhpPeanuts stores and retrieves in/from MySQL. The design is prepared for the use of different databases, but this has not been implemented and tried yet.
Peanuts whose classes are direct or indirect subclasses of PntDbObject will store themselves in the database when their save method is called. They are retrieved by . use this for navigation over .
To keep the framework simple, phpPeanuts persistency by default maps one class to one table. The only exception is , that supports the mapping of additional fields from a subclass to an additional table.
With phpPeanuts, persistency is framework based. This means the framework provides persistency, but when you need more sophisticated persistency you can override parts of it, or write your own. It can be written like peanut managed persistency or container managed persistency, see How to write your own persistency.
One part of persistency that is not so simple is the SQL generation by and SortObjects. They are necessary for the generic search- and dialog pages. Some refactoring may be necessary before these can be extended to support more sophisticated persistency. Please inform us if you run into limitations of filters. |
|