Hi!

[JoinTable(
    name="users_phonenumbers",
    joinColumns=array(
        [JoinColumn(name="user_id", referencedColumnName="id")]
    ),
    inverseJoinColumns=array(
        [JoinColumn(name="phonenumber_id", referencedColumnName="id",
unique=true)]
    )
)]
     [Validation([Email(checkMX = true)])]

I'm getting a feeling we are developing language inside language here. We rejected [] syntax for arrays because it makes the intent unclear. I'd say if that's unclear [Validation([Email(checkMX = true)])] is super-unclear - what exactly is supposed to happen there? It is very non-obvious. I think it needs to be radically simplified. I understand that people that write ORMs etc. want their work to be easier, but I don't think turning PHP into a mesh of random brackets and words worth it. If we can't find a model that is easy to comprehend, ORMs would have to use XML or other outside-of-syntax means.

--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to