cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Unique Index Constraints in Cayenne Modeler
Date Sat, 08 Oct 2011 09:36:59 GMT

On Oct 8, 2011, at 12:17 AM, Daniel Scheibe wrote:

> i was just asking myself if i'm missing something or if its not possible to configure
unique index constraints inside cayenne modeler?

You are correct. CayenneModeler is not a DB admin tool, so DB concepts not directly related
to ORM are generally ignored. UNIQUE indexes are somewhat on the border and I even believe
we have a feature request in Jira somewhere...

> Another thing that's bugging me is the way cayenne modeler trys to delete the records
from the pk generation table on schema updates/modifications. I  wrote some code to manually
update the pk generation table on startup of my application to set the available primary key
identifier to the highest number used in the corresponding table but that doesn't feel like
taking the right approach.

Yeah good point. This can be improved. Maybe do something like "select max(ID) from table
X" to determine initial value?

Andrus
Mime
View raw message