Corma has really only a few requirements in how you write your data objects and repositories.
Data objects must abide by the following rules:
- Your objects must implement DataObjectInterface. We recommend extending DataObject.
- Your object property names must be exactly the same as your database column names.
The default implementation of DataObject::getTableName() takes the name of the class (minus namespace) and pluralizes and separates camel casing with underscores. For example this would make MyObject translate to a table name of "my_objects". You can easily overwrite the getTableName() in your own base DataObject class or simply return a string with the table name in your classes.
Repositories must abide by the following rules:
- Your repository must implement ObjectRepositoryInterface, again we recommend extending ObjectRepository.
- If your DataObject is MyNamespace\DataObjects\MyObject then your repository must be MyNamespace\DataObjects\Repository\MyObjectRepository