Corma has really only a few requirements in how you write your data objects and repositories.

Data objects must abide by the following rules:

  1. Your objects must implement DataObjectInterface. We recommend extending DataObject.
  2. 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:

  1. Your repository must implement ObjectRepositoryInterface, again we recommend extending ObjectRepository.
  2. If your DataObject is MyNamespace\DataObjects\MyObject then your repository must be MyNamespace\DataObjects\Repository\MyObjectRepository