On Monday, 7 April 2014 13:10:45 UTC+2, Parsifal wrote:
>
> My question is that: Did I understand correctly that a random data such as 
> TransactionId  cannot be used to map between two entities? and at least one 
> of them should be incrementing and the another one should be primary and 
> when adding a record to this entity, first that another entity should be 
> called
>
No, you did not understand that correctly. The only necessity of a primary 
key is that it is unique, not that it is incrementing. 

If an identity of an entity exists in your domain (here: the transaction ID 
that is returned by PayPal) it is better to take that instead of generating 
another one with auto-increment. But I can imagine you want to persist some 
information about the transaction even before getting an answer from 
PayPal. In that case you can first make your own transactionID and later 
add the transaction ID from PayPal too. 

No idea what you mean by "the transactionId is returned by PayPal IPN and 
this is random". Random? It is just the ID that PayPal returns, isn't it? A 
unique key for that transaction. Not more, not less. I don't see the 
problem. 
 

-- 
You received this message because you are subscribed to the Google Groups 
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to