Not sure I understand the question correctly.
I am only adding 1 at a time if that is the question. This problem is
occurring when I edit an existing Product.
I came up with a solution but the side effect (I think but have not
tested) will be that I cannot edit the Product so it is in another
category using this function. Although I'm not I could do that
anyway :)
I solved the problem as such:
<cfif IsInstanceOf(this,"components.IMultiRelational") AND NOT
instance.object.getIsPersisted() AND NOT instance.object.getIsDirty()>
<cfset instance.object = setRelationships
(instance.object,arguments.form)>
</cfif>
=============
<cffunction name="setRelationships" access="public"
returntype="Struct">
<cfargument name="object" type="Struct" required="true">
<cfargument name="form" type="Struct" required="true">
<cfset shelf = transfer.get("basic.Shelf",arguments.form.shelfidfk)>
<cfset shelf.addProduct(object)>
<cfset transfer.save(shelf)>
<cfreturn ARGUMENTS.object>
</cffunction>
> E:
mark.man...@gmail.com
> W:
www.compoundtheory.com