1.4.6 Build 488

visual editor for ORM frameworks

Pricing information Free download
Watch screencast How to install ORM Designer on Linux How to install ORM Designer on Mac OS X

ORM Designer and CakePHP

From ORM Designer version 1.3.2, CakePHP is fully supported. If you have any feature request or issue report, please contact us on the forum or send us a mail to support@orm-designer.com. Thank you for helping us making ORM Designer better.

Follow this tutorial to start using ORM Designer.

Database modeling

With ORM Designer you start with modeling and defining CakePHP model objects in the same way you are used to define database tables and relationships. This way you have only one place you have to make changes to the database structure and you can be sure the visual model is always up to date with the real application.


Complete model definitions

Before ORM Designer you had to write database model definitions by hand which meant you did everything to avoid writing the full database table definition. ORM Designer helps you by guiding you through the whole definition process. Once you define tables and relationships you can add ORM specific attributes (e.g. behaviours, extended relationship definitions, cache etc.). ORM Designer exports the definitions into PHP code stored in a Base class which you extend instead of AppModel class. This way you can add methods or ovewrite base definitions without the risc of ORM Designer losing all your work.

Example of BaseAddress and Address class generated with ORM designer.

Base class example

<?php
/**
* BaseAddress
* This class has been auto-generated by ORM Designer
*/

class BaseAddress extends AppModel
{
  public $name = 'Address';
  public $primaryKey = 'ID';
  public $actAs = 
    array (
      'Translate' => 
        array ( 'City','State'
        ),
      'ACL' => 
        array (
          'type' => 'requester'
        )
    );
  public $tablePrefix = 'db_';
  public $logTransactions = 'true';
  public $_schema = 
    array (
      'ID' => 
        array (
          'type' => 'integer',
          'length' => 4,
          'null' => false
        ),
      'Contact_ID' => 
        array (
          'type' => 'integer',
          'null' => false
        ),
      'StreetNumber' => 
        array (
          'type' => 'integer',
          'length' => 5,
          'null' => false
        )
    );
  public $belongsTo = 
    array (
      'Address' => 
        array (
          'className' => 'Address',
          'foreignKey' => 'Contact_ID',
          'counterCache' => 'true'
        )
    );
}
?>

Derived class example

<?php
require_once 'base/base_address.php';

class Address extends BaseAddress
{
}

Be more effective

When we were working on ORM Designer we asked ourselves what are our everydays tasks and we did our best to make these tasks easy and fast. We are proud of the searching and model navigation features. We hope you will enjoy "Summary window" which provides full text search through columns, tables, relations or indexes. Or a fully searchable "Project tree" which is another helpful visualization of your CakePHP project.


External tools

ORM Designer enables you to set an external tool. Each external tool is defined by its executable-path, arguments and by default path. It is also possible to use pre-defined constants that are evaluated before tool is executed. These constants can be substituted with current project name, project path, ORM or MVC framework.


Download ORM Designer for CakePHP

If you are interested in ORM Designer application, here you can download a free 14 days trial version.

Download now

Appendix: Supported CakePHP features

  • Generate PHP code with definition of models
    • Generate base model class
    • One time generation of empty derived model class
  • Automatic generation of association code to base model class
    • hasOne
    • hasMany
    • belongsTo
    • hasAndBelongsToMany (HABTM)
  • Support for editing all model attributes via ORM Designer
    • tablePrefix
    • recursive
    • order
    • ...
  • Support for editing all association attributes via ORM Designer
    • condition
    • counterCache
    • dependent
    • exclusive
    • ...
  • Support for CakePHP model behaviours
    • ACL
    • Containable
    • Translate
    • Tree
  • Automatic filled model attributes in base model class
    • primaryKey (automatic filled)
    • _schema (automatic generated array of columns)
  • Support for CakePHP data types
  • Support for CakePHP directory structure

CakePHP CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.

The name CakePHP and the cake icon are trademarks of the Cake Software Foundation Inc., and used with permission.

ORM Designer on Twitter

Feed from our blog

Missing field-type icons in ORM Designer

Propel ORM Behaviors support!

Propel ORM validators support!

How to change export format (schema.yml / schema.xml)

How to import model from MySql Workbench

New visual symbols for NULL/NOT NULL column types

Execute another application from ORM Designer import/export script

Forum topics

ORM Designer forum: http://forum.orm-designer.com/

About ORM Designer

ORM Designer is a tool for modelling entity relationship diagrams (ERD). The biggest advantage is full support of any ORM framework which has its definitions stored in a markup language or other structured file.

Currently supported ORMs are PHP Doctrine, PHP Propel and CakePHP frameworks, but more will be added in close future.

Inventic s.r.o. - PayPal verified

Real Time Web Analytics

Clicky

Legal notice: The name CakePHP and the cake icon are trademarks of the Cake Software Foundation Inc., and used with permission. "symfony" is a trademark of Fabien Potencier.

© 2009-2012 Inventic s.r.o. all rights reserved