Re: Modeler: Reengineer from MySQL Server

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Fri Oct 31 2003 - 11:19:51 EST

  • Next message: Andrus Adamchik: "Re: Concurrency?"

    Hi Jorge,

    The reason why relationships were not discovered by Cayenne is because
    of MySQL. It does not support referential integrity constraints, and
    these constraints are exactly the piece of information used by Cayenne
    to infer relationships. E.g. On Oracle or Sybase this would've worked
    fine.

    As for the methodology, my recommendation would be to reverse engineer
    what you can, then create relationships manually, and on future
    database changes do the manual model updates (assuming that changes to
    any existing DB are normally pretty minor, this shouldn't be a big
    deal).

    Andrus

    On Oct 31, 2003, at 10:43 AM, Jorge Sopena wrote:

    > I'm new to Cayenne...
    >
    > So the first thing I've done is to Reengineer my MySql database.
    > I got it to connect to DB fine.
    > All the ObjEntities and DBEntities were recovered well with its
    > attributes.
    > But all of them were created without any relationship.
    > Is there any way to get the relationships from the DB with the
    > Reengineer means?
    > If not, how can I preserve the relationships I create from the next
    > Reengineer I do?
    > Because, If my DB change and I want to recover the new schema, all the
    > relationships I did manually in the modeler dissappeared.
    >
    > Thanks in advance,
    >
    > Jorge
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Oct 31 2003 - 11:19:56 EST