Re: Relationships without FK constraints?

From: Andrey Razumovsky (razumovsky.andre..mail.com)
Date: Fri Mar 27 2009 - 14:18:31 EDT

  • Next message: Joseph Schmidt: "Re: Relationships without FK constraints?"

    Just reread your question.. Sorry for misleading. This is true, Cayenne
    cannot know about relationships in DB without FKs. So you have to map them
    manually

    2009/3/27 Andrey Razumovsky <razumovsky.andre..mail.com>

    > Yeah, it will make ObjRelation named "artist" from column "artist_id".
    > More info here:
    > http://cwiki.apache.org/confluence/display/CAYDOC/Reverse+Engineer+Database
    >
    > 2009/3/27 Michael Gentry <mgentr..asslight.net>
    >
    > I'm not familiar with that option/strategy, but perhaps someone else
    >> here has used it and can jump in.
    >>
    >> mrg
    >>
    >>
    >> On Fri, Mar 27, 2009 at 1:22 PM, Joseph Schmidt
    >> <joseph_schmidt7..ahoo.com> wrote:
    >> >
    >> >> I don't reverse engineer often, but I
    >> >> believe if the constraints
    >> >> aren't defined in the DB, then the reverse engineering
    >> >> process has no
    >> >> way of knowing about the relationship,
    >> > Well, it could, based on the naming conventions: e.g.
    >> > "artist_id" from any table is a relation to "artists" table.
    >> > When doing reverse engineering there is the SmartNamingStrategy
    >> selectable, that I think is supposed to do exactly this kind of convention
    >> based recognition.
    >> > At least from it's test class:
    >> >
    >> cayenne\framework\cayenne-modeler\src\test\java\org\apache\cayenne\modeler\util\SmartNamingStrategyTest.java
    >> > it looks like it's trying to test something in this direction.
    >> >
    >> > Thanks,
    >> > Joseph.
    >> >
    >> >
    >> >
    >> >
    >> >
    >>
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Mar 27 2009 - 14:19:02 EDT