[transfer-dev] Re: Column Specified 2x

2009-08-03 Thread Paul Marcotte
Dan,

If you remove the productId property from the review object definition, you
should be golden.  Since that column forms the one to many relationship, you
cannot also specify it as a property.

Paul

On Mon, Aug 3, 2009 at 9:30 PM, Dan Vega  wrote:

>
> I have probably screwed something up here but I can not figure out why
> i am getting this error. I have a product and each product can have
> many reviews. I have  onetomany relationship defined like this.
>
> 
> http://www.w3.org/2001/XMLSchema-instance";>
>
>
>
> decorator="unitedcommerce.model.Product">
>
>
>
>
>
>
>
>
>
>
> table="ProductCategories">
>
>
>
>
>
>
>
>
>
>
> order="desc"/>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> decorator="unitedcommerce.model.User">
>
>
>
>
> type="string"/>
> type="string"/>
>
>
>
>
> 
>
> When I try to go and save the review (form on the product page) I get
> this error but the record saves just fine.
>
> Error Executing Database Query.
> Column 'productId' specified twice
>
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 
> >
>


-- 
Paul Marcotte
Fancy Bread - in the heart or in the head?
http://www.fancybread.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
-~--~~~~--~~--~--~---



[transfer-dev] Column Specified 2x

2009-08-03 Thread Dan Vega

I have probably screwed something up here but I can not figure out why
i am getting this error. I have a product and each product can have
many reviews. I have  onetomany relationship defined like this.


http://www.w3.org/2001/XMLSchema-instance";>




























































When I try to go and save the review (form on the product page) I get
this error but the record saves just fine.

Error Executing Database Query.
Column 'productId' specified twice


















--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[transfer-dev] Event Handlers: Comparing Changes

2009-08-03 Thread Denver

Hello,
I am attempting to use event handlers to catch updates to my
TransferObjects before they happen, so that I can log changes into a
history table.

So far I have set up a beforeUpdateObserver and the event being passed
in allows me to access the object that is about to get saved to the
database, but I can't figure out how to take a look at a pristine copy
of that object.
(i.e. I have a user, and I have changed his first name.  When I save()
that user object, the beforeUpdateObserver is called, and I am able to
access the object with the new first name, but I can't figure out how
to see what his first name was before the change).

What should I do?

I have thought about cloning the changed object and then discarding
it, retrieving a fresh copy of the object, and then comparing those,
but that seems like a bad idea.


Thoughts?

-Denver Root
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---