I have two table entites which have a one-to-many relationship to an
image table. Both are used to attach several pictures to them. Both
using the same reference field 'img_ref_uuid' in the image table.
It works well for ONE one-to-many realtionship. When I use iSECOND
one-to-many realtioshiop and try to save it, I get an error.
"Error Type: Database : 42000
Error Messages: Error Executing Database Query.
Column 'img_ref_uuid' specified twice"
in variables.transfer.save(imgBean);
The funny thing IS: It's DOES SAVE correctly to the database. It get
the images as an array in the object whe I read the the object with
transfer...
Since it seems to work properly by saving it to the database in the
background, It's strange to get this error message. Maybe I miss here
something or is it a bug?
<object name="branch" table="branch"
decorator="com.baehler.branch.branch">
<id name="branch_id" type="UUID" generate="true" />
<property name="branch_label" type="string" column="branch_label"
nullable="true" />
...
<onetomany name="branchimage">
<link to="asset.image" column="img_ref_uuid"/>
<collection type="array">
<order property="img_created"/>
</collection>
</onetomany>
</object>
<object name="product" table="product"
decorator="com.baehler.product.product">
<id name="prd_id" column="prd_id" type="UUID" generate="true" />
<property name="prd_name" type="string" column="prd_bezeichnung"
nullable="false" />
....
<onetomany name="productimage">
<link to="asset.image" column="img_ref_uuid"/>
<collection type="array">
<order property="img_created"/>
</collection>
</onetomany>
</object>
<object name="image" table="image"
decorator="com.baehler.asset.image">
<id name="img_id" type="UUID" generate="true"/>
<property name="img_src" type="string" column="img_src"
nullable="false" />
<property name="img_height" type="numeric" column="img_height"
nullable="true" />
<property name="img_width" type="numeric" column="img_width"
nullable="true" />
<property name="img_size" type="numeric" column="img_size"
nullable="true" />
<property name="img_type" type="string" column="img_type"
nullable="false" />
<property name="img_caption" type="string" column="img_caption"
nullable="true" />
<property name="img_created" type="date" column="img_created" ignore-
insert="true" ignore-update="true"/>
<property name="img_updated" type="date" column="img_updated"
nullable="true" />
<property name="img_tn" type="string" column="img_tn"
nullable="true" />
</object>
Daniel
--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer
You received this message because you are subscribed to the Google Groups
"transfer-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---