Hey guys, any thoughts are appreciated ...
When a user submits a quiz, my QuizResult transfer object is saved -
transfer.save(QuizResult)
The problem occurs when the user hits "back" to fix their answers and
resubmit ... at this point transfer runs save again, but instead of an
update, it tries to do another create. This generates a SQL error
since it tries to insert a duplicate record ... the TO doesn't realize
it's already persisted
in order to force transfer to run create or update in the correct
scenario, I stuck in an "exists" method ...
if( exists(quizResult) )
{
transfer.update(quizResult);
}
else
{
transfer.create(quizResult);
}
but this is still giving me problems because, after hitting the back
button, the transfer object still thinks it isn't persisted even when
it is, so while it does run "update", it also blows up: "The Transfer
Object of type 'quizResult.QuizResult' has not been created in the
database"
Can anyone point me in the right direction on this? Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---