ORM Designer – an answer from Inventic and the route to beta cake support

Many thanks to František Tröster – from Inventic http://www.inventic.cz

With his permission, parts of his answer to my previous post are published here, with my comments, as a follow-up.

I appreciate the fast and detailed answer – it shows they really care about their product, and user feedback.

I’m a little bit late for release 1.4.0, but hopefully some of my considerations may be useful for a future release.

Fast over the first points – I basically agree and have not much to add

We’ve read the review and it gave us really useful insights how users work with ORM Designer. Back to some interesting points you had in the review:

1. Create new table, enter doesn’t add a new field.

You can create new table by pressing CTRL + T and clicking on the designing area. This will open a new table window where you press CTRL + INS to add new columns. Then you need to move between fields with arrow keys.

That’s fine for me

2. Create relation.

We like your idea of drag and drop and we will have a look if it would be possible to implement. To create new relation you need to press CTRL + R and click on table from which the relation goes and then click on the destination table.

Good – I’d like the drag and drop alternative way of adding relations, but as I said, it works well as it is now, so this feature is not a top priority for me – it’s a matter of tastes, after all

3. Drawn tables are the objects…

This naming inconsistency is being fixed in version 1.4.0 which should be released within a few days. If everything goes well the beta version would be released today or on Monday.

Thumbs up

4. Field types are generalized, not db specific…

The field types are ORM framework specific. You should see all the types available by CakePHP if you select CakePHP project.

Thums up again

5. I’m not going to write all the validation rules (or even the virtual fields) in a (more or less) 20 char field…

Trouble with CakePHP is we don’t get enough feedback from the community. If you would be willing to create a simple mockup or describe more how the editor should work, we can postpone 1.4.0 release date and add this feature. If you find something you are missing there, feel free to let us know, your ideas won’t end in a trash.

Ok, I’m late for 1.4.0, but this is the most interesting question – see below for details

6. For my needs, it complements well sqlyog. I wish it was a db design tool also! An sql export (and import) feature would be awesome (I know, it contradicts the abstraction of this software).. but..

We were and still are thinking how to best integrate DB connections. We want to keep ORM Designer lightweight and focused on one task which is designing application model. But we know it would be useful to add these features. Currently we are thinking about creating a web service or some sort of optional plug-ins or separate tools.

I like this philosophy. Do one thing, and do it well – there are already a lot of bloated software out there. As I said in the previous post, there are workarounds – get the schema from the generated model and build the sql.
An optional tool, webservice or plugin would be a gret addition: an useful feature, while letting orm designer saty light and do his job smoothly.

We have focused way too much on developing new features and forgot to let the community know how to get most of these new tools. We started ORM Designer Blog (http://blog.orm-designer.com/) where we are trying to give more details about currently developed features and you will definitely see some short videos and articles about using shortcuts etc.

We hope you’ll be happy ORM Designer user and as said before if you ever feel ORM Designer is missing a feature, let us know. Best regards

I’ll do 🙂

Starting from here and now – back to #5:

In my opinion, one field of the ORM box may become a lot more useful –  the validation. (And maybe the virtual fields, but it is something a lot more customized and maybe database-dependent)

In cake php 1.3 there is a better model generation – something ORM Designer has to compete to, at least for small projects where a visual representation may not be so mandatory.


Validation was probably the cake bake weaker point in 1.2, it is a strong point in cake 1.3:

for each field bake asks which rule to apply (for n times, until you answer “no” to the “add new rules” question. Cake has a lot of predefined rules to cover most of the cases.

The developer has to add the details for the rules, if needed. (e.g. minLenght..)

Here are the details about validation rules in cake:


Here is the generated code for the example:

  1. <?php
  2. class Post extends AppModel {
  3. var $name = 'Post';
  4. var $displayField = 'title';
  5. var $validate = array(
  6. 'title' => array(
  7. 'minlength' => array(
  8. 'rule' => array('minlength'),
  9. //'message' => 'Your custom message here',
  10. //'allowEmpty' => false,
  11. //'required' => false,
  12. //'last' => false, // Stop validation after this rule
  13. //'on' => 'create', // Limit validation to 'create' or 'update' operations
  14. ),
  15. ),
  16. 'publish' => array(
  17. 'boolean' => array(
  18. 'rule' => array('boolean'),
  19. //'message' => 'Your custom message here',
  20. //'allowEmpty' => false,
  21. //'required' => false,
  22. //'last' => false, // Stop validation after this rule
  23. //'on' => 'create', // Limit validation to 'create' or 'update' operations
  24. ),
  25. ),
  26. );
  27. //The Associations below have been created with all possible keys, those that are not needed can be removed
  29. var $belongsTo = array(
  30. 'User' => array(
  31. 'className' => 'User',
  32. 'foreignKey' => 'user_id',
  33. 'conditions' => '',
  34. 'fields' => '',
  35. 'order' => ''
  36. ),
  37. 'ParentPost' => array(
  38. 'className' => 'Post',
  39. 'foreignKey' => 'parent_id',
  40. 'conditions' => '',
  41. 'fields' => '',
  42. 'order' => ''
  43. )
  44. );
  46. var $hasMany = array(
  47. 'ChildPost' => array(
  48. 'className' => 'Post',
  49. 'foreignKey' => 'parent_id',
  50. 'dependent' => false,
  51. 'conditions' => '',
  52. 'fields' => '',
  53. 'order' => '',
  54. 'limit' => '',
  55. 'offset' => '',
  56. 'exclusive' => '',
  57. 'finderQuery' => '',
  58. 'counterQuery' => ''
  59. )
  60. );
  62. }
  63. ?>

As you see now bake generates a complete set of arrays for cake validation with multiple rules per field – with optional commented values, so it’s very easy to edit and get almost all you need. You only need to check the manual for the single rule details like 'rule' => array('between', 5, 15) or 'rule' => array('minLength', '8').

The first thing I’d like to see in the cakephp support of ORM designer is a popup / wizard that mimics the bake model validation feature. I don’t know haw hard would it be to implement, or if it’s something outside the ORM Designer scope.. it’s just something that makes me still opt for cake bake instead of ORM itself in many cases: I only know it would fit my needs more with that feature.

2. Create relation.

We like your idea of drag and drop and we will have a look if it would be possible to implement. To create new relation you need to press CTRL + R and click on table from which the relation goes and then click on the destination table.