Re: [JIRA] Commented: (CAY-777) Still incorrect: CLONE -Import EOModel - Incorrect Join src/target names are created

From: Mike Kienenberger (mkienen..mail.com)
Date: Mon Apr 16 2007 - 12:49:30 EDT

  • Next message: Andrus Adamchik: "Re: [JIRA] Commented: (CAY-777) Still incorrect: CLONE -Import EOModel - Incorrect Join src/target names are created"

    Yegor,

    You posted the Cayenne data map, which is probably helpful.

    But what's needed (What Andrus asked for) is the EOModel files,
    probably at minimal the Company and BooleanValue.plist files.

    On 4/16/07, Yegor <yego..intecmedia.com> wrote:
    > Hi!
    >
    > Although I CAN send you the complete set of files and an SQL script to
    > create MySQL database, I have decided to extract the relevant part only:
    >
    > <?xml version="1.0" encoding="utf-8"?>
    > <data-map project-version="2.0">
    > <property name="defaultPackage" value="com.ray.database"/>
    > <property name="defaultSchema" value="ray"/>
    >
    > <db-entity name="boolean_value" catalog="ray">
    > <db-attribute name="BOOLEAN_VALUE_ID" type="INTEGER"
    > isPrimaryKey="true" isMandatory="true" length="11"/>
    > <db-attribute name="NAME" type="VARCHAR"
    > isMandatory="true" length="200"/>
    > <db-attribute name="PRIORITY" type="INTEGER"
    > isMandatory="true" length="11"/>
    > </db-entity>
    > <db-entity name="company" catalog="ray">
    > <db-attribute name="COMPANY_ID" type="INTEGER"
    > isPrimaryKey="true" isMandatory="true" length="11"/>
    > <db-attribute name="ELEMENTS_USED_ID" type="INTEGER"
    > isMandatory="true" length="11"/>
    > <db-attribute name="MODELS_USED_ID" type="INTEGER"
    > isMandatory="true" length="11"/>
    > </db-entity>
    >
    > <obj-entity name="BooleanValue"
    > className="com.ray.database.BooleanValue" dbEntityName="boolean_value">
    > <obj-attribute name="name" type="java.lang.String"
    > db-attribute-path="NAME"/>
    > <obj-attribute name="priority" type="java.lang.Integer"
    > db-attribute-path="PRIORITY"/>
    > </obj-entity>
    > <obj-entity name="Company" className="com.ray.database.Company"
    > dbEntityName="company">
    > </obj-entity>
    >
    > <db-relationship name="companyArray" source="boolean_value"
    > target="company" toMany="true">
    > <db-attribute-pair source="BOOLEAN_VALUE_ID"
    > target="ELEMENTS_USED_ID"/>
    > </db-relationship>
    > <db-relationship name="companyArray1" source="boolean_value"
    > target="company" toMany="true">
    > <db-attribute-pair source="BOOLEAN_VALUE_ID"
    > target="MODELS_USED_ID"/>
    > </db-relationship>
    >
    > <db-relationship name="toBooleanValue" source="company"
    > target="boolean_value" toMany="false">
    > <db-attribute-pair source="ELEMENTS_USED_ID"
    > target="BOOLEAN_VALUE_ID"/>
    > </db-relationship>
    > <db-relationship name="toBooleanValue1" source="company"
    > target="boolean_value" toMany="false">
    > <db-attribute-pair source="MODELS_USED_ID"
    > target="BOOLEAN_VALUE_ID"/>
    > </db-relationship>
    >
    > <obj-relationship name="companyArray" source="BooleanValue"
    > target="Company" db-relationship-path="companyArray"/>
    > <obj-relationship name="companyArray1" source="BooleanValue"
    > target="Company" db-relationship-path="companyArray1"/>
    > <obj-relationship name="toBooleanValue" source="Company"
    > target="BooleanValue" db-relationship-path="toBooleanValue"/>
    > <obj-relationship name="toBooleanValue1" source="Company"
    > target="BooleanValue" db-relationship-path="toBooleanValue1"/>
    > </data-map>
    >
    > Notice, ELEMENTS_USED_ID became toBooleanValue and MODELS_USED_ID became
    > toBooleanValue1.
    >
    > I am sorry to say, that this is a showstopper for me: for a Company
    > table, I simply do not know, whether to use toBooleanValue or
    > toBooleanValue1.
    >
    > If you need the complete files, I will be happy to send them.
    >
    > Thanks!!!
    >
    >
    > -----Original Message-----
    > From: Andrus Adamchik (JIRA) [mailto:de..ayenne.apache.org]
    > Sent: Monday, April 16, 2007 6:47 PM
    > To: Yegor
    > Subject: [JIRA] Commented: (CAY-777) Still incorrect: CLONE -Import
    > EOModel - Incorrect Join src/target names are created
    >
    >
    > [
    > https://issues.apache.org/cayenne/browse/CAY-777?page=com.atlassian.jira
    > .plugin.system.issuetabpanels:comment-tabpanel#action_12289 ]
    >
    > Andrus Adamchik commented on CAY-777:
    > -------------------------------------
    >
    > Yegor,
    >
    > could you possibly attach an EOModel (or a relevant part of it) to this
    > issue? This will significantly speed up the fix. Or if it contains
    > sensitive company data, could you create a neutral EOModel from scratch
    > that reproduces the problem.
    >
    > Thanks
    > Andrus
    >
    > > Still incorrect: CLONE -Import EOModel - Incorrect Join src/target
    > > names are created
    > > ----------------------------------------------------------------------
    > > --------------
    > >
    > > Key: CAY-777
    > > URL: https://issues.apache.org/cayenne/browse/CAY-777
    > > Project: Cayenne
    > > Issue Type: Bug
    > > Components: Cayenne Core Library
    > > Affects Versions: 1.1 [LEGACY]
    > > Environment: EOModels created for WO5.2, Cayenne 1.1B1
    > > Reporter: Kurbachev Yegor
    > > Assigned To: Andrus Adamchik
    > > Priority: Critical
    > > Fix For: 1.1 [LEGACY]
    > >
    > >
    > > Join source amd target are all created using ObjAttribute names,
    > > instead of column names. This may still work for EOModels where the
    > > two are the same, but it is a nasty bug that completely prevents
    > > import from working in a general case. Looks like a fresh one (after
    > > we switched from DBAttributePair to DBJoin, ca. M6)
    >
    > --
    > This message is automatically generated by JIRA.
    > -
    > You can reply to this email to add a comment to the issue online.
    >
    >
    >
    >
    >
    >
    > ************************************************************************
    > ************
    > This footnote confirms that this email message has been scanned by
    > PineApp Mail-SeCure for the presence of malicious code, vandals &
    > computer viruses.
    > ************************************************************************
    > ************
    >
    >
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Mon Apr 16 2007 - 12:50:06 EDT