But I'd say it not essential. In any project of decent size you're likely
to have SOME additional sql to execute to set up your database, be it
creating views or functions or triggers or indexes. It's definitely not the
modeler's job to handle all that stuff. So if you have to execute custom
sql already, it's trivial to add the unique constraints at the same time.
What I would really like to see in Modeler is the ability to define *default
values* for attributes. That is useful because since cayenne is generating
the sql to define the column it's really nice to have it go all the way.
And the default values can be utilized in the object side in memory when
new objects are created, so it's not just an SQL thing.
Not that I disagree, but we can say this about eg. comments as well,
generating default javadoc for public properties in CDOs so the model
would contain some description.
I think default values, unique keys and e.g. comments and etc. would all
be very useful in cayenne modeler. I know i takes time to implement and
there are more important issues at stake. However, sometimes DB modeler
is overkill so maybe it would just help if cayenne modeler would allow
to append arbitrary SQL and store it in XML for later (DDL generation).
Although this would not directly automate tasks we mentioned, it would
be imho cost effective feature for inserts, additional constraints, etc.
Regards,
Marek