FAQ
I am using Cayenne 2.0.4.

I added a table to my database and then manually added as a dbentity and
objentity in the modeler.

When I save the project, I get the Warning:

DbRelationship <TOURNAMENT_TEMPLATES.toSites> has no joins.

once for each relationship in the db entity that I manually addecd.

I am getting this error only on this db entity but I have similar db
entities that are not getting this error that are set up the same way as
far as I can tell.

When I access the object in my application I get SQL that looks like this:

SELECT DISTINCT t0.ID, t0.LONG_NAME, t0.NAME, t0.ONLINE FROM APP.SITES
t0, APP.TOURNAMENT_TEMPLATES t1 WHERE AND (t1.id = ?) [bind: 1]

which obviously results in an SQLException.

I presume this is related to the problem that results in the warning
message.

Can anyone tell me from this information what I may be missing?

I could reimport my schema into the modeler from scratch but I really
don't want to do that since I have had to modify the project a lot from
the imported state.

Thanks,

Mark

Search Discussions

  • Andrey Razumovsky at Aug 29, 2009 at 2:46 pm
    Hi,

    If you create your Cayenne map by hand (not by reverse engineering), you
    should press 'Inspect' button on every relationship and specify source and
    target columns that construct that relationship (joins). To synchronize
    schema and DB, in the future consider Cayenne's "Migrate database" feature

    2009/8/29 Mark Fraser <mark@mark100.net>
    I am using Cayenne 2.0.4.

    I added a table to my database and then manually added as a dbentity and
    objentity in the modeler.

    When I save the project, I get the Warning:

    DbRelationship <TOURNAMENT_TEMPLATES.toSites> has no joins.

    once for each relationship in the db entity that I manually addecd.

    I am getting this error only on this db entity but I have similar db
    entities that are not getting this error that are set up the same way as far
    as I can tell.

    When I access the object in my application I get SQL that looks like this:

    SELECT DISTINCT t0.ID, t0.LONG_NAME, t0.NAME, t0.ONLINE FROM APP.SITES t0,
    APP.TOURNAMENT_TEMPLATES t1 WHERE AND (t1.id = ?) [bind: 1]

    which obviously results in an SQLException.

    I presume this is related to the problem that results in the warning
    message.

    Can anyone tell me from this information what I may be missing?

    I could reimport my schema into the modeler from scratch but I really don't
    want to do that since I have had to modify the project a lot from the
    imported state.

    Thanks,

    Mark

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedAug 28, '09 at 11:59p
activeAug 29, '09 at 2:46p
posts2
users2
websitecayenne.apache.org

2 users in discussion

Mark Fraser: 1 post Andrey Razumovsky: 1 post

People

Translate

site design / logo © 2022 Grokbase