Skipper - The ORM Designer Blog
  • Skipper - The ORM Designer
  • VsBuilds - Parallel building
  • Pulpo - Free Skipper CLI

How to start with Doctrine2 in ORM Designer

The simplest way how to start using ORM Designer with your current Doctrine2 model is to use an import doctrine2 model function. Currently is available only import from Doctrine2 XML schema files. If you have your model defined in anotation or using YAML files, please convert it to XML files. After that, follow next step-by-step instructions.

Import a new project from ORM

In a ribbon menu select Import New… and then Import Project from ORM.

In Import Project Wizard choose your project name and a root directory of your project where are your Doctrine2 XML files stored. As MVC framework choose Without Framework and as ORM choose Doctrine2 as shown on this screenshot.

After an import confirmation ORM Designer starts searching for your files and import them to new ORM Designer model.

In our example we import unit-testing model from Doctrine2 repository called CMS. When import procedure is over, you will see model like this.

After that you can start enjoying ORM Designer in your work with Doctrine2 model.

## More details about using ORM Designer with Doctrine2

Using of Doctrine2 in ORM Designer is very similar to using ORM Designer with PHP ORM Doctrine framework. For more information please look at ORM Designer and Doctrine framework page.

Supported Doctrine2 properties

Currently ORM Designer supports all properties from Doctrine2 except inheritance, which will be implemented during next months. All supported properties are based on official Doctrine2 XML schema. You can edit all properties simply by selecting the object and enter value to correspond field.

There are lot of properties which can be edited for every type. Here are screenshots of property editors for entity, field, association, many to many association.

Download ORM Designer with Doctrine2 support

If you want to download ORMD with Doctrine2 support, please download latest version from our site http://www.orm-designer.com/download-orm-designer. If you find any inconsistency or bug, please let us know.

Appendix: Supported Doctrine2 properties and behaviors

Supported Doctrine2 core properties

Object Property
Project Name, CodeName, Description
Module Name, Description
Entity Name, Description
Field Name, Type, Size, Required, Unique, Primary key, Auto increment, Default value, Enum values, Description
Association (1:m ) Name, Reference columns, Owning alias, Inverse Alias, Association type, Parent required
Index Name, Unique, Indexed columns
Many to Many associtaion M:N Entity, First and second entity, Alias to first and second entity

Supported Doctrine2 ORM properties

Object Property
Module namespace
Entity db table,schema,repository-class,inheritance-type,export-file-name,change-tracking-policy,lifecycle-callbacks
Field db column,version,scale,precision,column-definition,generator, generator strategy,sequence-generator,sequence-name,allocation-size,initial-value
Associtaion (1:m) on-delete,on-update,owning side/inverse side, fetch,orphan-repoval,cascade,order-by
Many to Many Association join-table-schema,fetch,on-delete,on-update,cascade,order-by
cascade-types cascade-all,cascade-persist,cascade-merge,cascade-remove,cascade-refresh

Appendix: Currently unsupported features for Doctrine2

ORM Designer currently doesn’t support inheritance in any level of designing (visual, editing, import, export). Iheritance for Doctrine2 and other ORM frameworks will be implemented in next few months.

Currently not supported XML tags from Doctrine2 schema:

  • discriminator-column
  • discriminator-mapping
  • discriminator-map
  • mapped-superclass
28 Jun 2010

Posted by: Ludek Vodicka

Skipper tips #features #doctrine