Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>"Target" combo is empty when you select the first relationship, simply because there's no ObjEntity for the join table. But if you keep selecting the next path component, "Product" will appear in the combobox. I wish we redesign this UI for better clarity, but it still works now. See the DataMap XML sample below. I just created it with 3.0.2 Modeler.</p> <p>Hope this helps.</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;data-map xmlns="http://cayenne.apache.org/schema/3.0/modelMap" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://cayenne.apache.org/schema/3.0/modelMap http://cayenne.apache.org/schema/3.0/modelMap.xsd" project-version="3.0.0.1"&gt; &lt;db-entity name="composition"&gt; &lt;db-attribute name="BASE_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/&gt; &lt;db-attribute name="CONTAINED_ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/&gt; &lt;/db-entity&gt; &lt;db-entity name="product"&gt; &lt;db-attribute name="ID" type="INTEGER" isPrimaryKey="true" isMandatory="true"/&gt; &lt;db-attribute name="NAME" type="VARCHAR" length="255"/&gt; &lt;/db-entity&gt; &lt;obj-entity name="Product" dbEntityName="product"&gt; &lt;obj-attribute name="name" type="java.lang.String" db-attribute-path="NAME"/&gt; &lt;/obj-entity&gt; &lt;db-relationship name="base" source="composition" target="product" toMany="false"&gt; &lt;db-attribute-pair source="BASE_ID" target="ID"/&gt; &lt;/db-relationship&gt; &lt;db-relationship name="contained" source="composition" target="product" toMany="false"&gt; &lt;db-attribute-pair source="CONTAINED_ID" target="ID"/&gt; &lt;/db-relationship&gt; &lt;db-relationship name="base" source="product" target="composition" toDependentPK="true" toMany="true"&gt; &lt;db-attribute-pair source="ID" target="BASE_ID"/&gt; &lt;/db-relationship&gt; &lt;db-relationship name="contained" source="product" target="composition" toDependentPK="true" toMany="true"&gt; &lt;db-attribute-pair source="ID" target="CONTAINED_ID"/&gt; &lt;/db-relationship&gt; &lt;obj-relationship name="base" source="Product" target="Product" deleteRule="Deny" db-relationship-path="contained.base"/&gt; &lt;obj-relationship name="contained" source="Product" target="Product" deleteRule="Deny" db-relationship-path="base.contained"/&gt; &lt;/data-map&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload