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>

On May 27, 10:12 am, Mark Mandel <mark.man...@gmail.com> wrote:
> Are you adding more than one?
>
> Mark
>
> On Wed, May 27, 2009 at 6:05 PM, Devon Burriss <de...@nervstudios.co.za>wrote:
>
>
>
> > As an example I have a many to many relationship between Product and
> > ProductCategory.
> > When I edit a product, it updates the DB but I have a duplicate in my
> > Product array. This duplicate is not in the DB, just the array.
>
> > Any ideas why this would happen?
>
> > Thanks
> > Devon
>
> --
> E: mark.man...@gmail.com
> W:www.compoundtheory.com
--~--~---------~--~----~------------~-------~--~----~
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 transfer-dev@googlegroups.com
To unsubscribe from this group, send email to 
transfer-dev-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/transfer-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to