cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Øyvind Harboe" <>
Subject On the fly reengineering of database schema
Date Fri, 20 Jul 2007 18:42:34 GMT
Currently our Cayenne app has the database field size and types stored
in the configuration files that ship with the application. They were
generated in the Cayenne modeler.

Is there any reason, in principle, why we couldn't read that info
during startup of the application? IOW, reengineering on the fly.

- It would allow database maintainers to adjust field sizes without us
updating Cayenne.
 We have a lot of variants of the database schema in the field and
changing size of a  NVARCHAR or changing an NVARCHAR to a CLOB would
be typical operations.
- Adding a field to a database table could be done from the database GUI
- We would be able to cope easily with the absence or presence of
optional table fields

The Cayenne modeler would still be useful to choose Java
representation of the fields regardless of their type(CLOB, NVARCHAR,
CHAR, etc.).

We have some database adapters that don't do robust reengineering
(FoxBase, MS Access, shudder!), but presumably we could
programatically adapt the Cayenne database schema for those/stick with
a default one which we do today.

Øyvind Harboe - eCos ARM & FPGA  developer kit

View raw message