It's early (for me), so I might be missing something, but I believe it would
be
questionType = transfer.get("QuestionType", 2);
quiz.setQuestionType(questionType);
transfer.save(quiz);
On Tue, Dec 30, 2008 at 10:26 AM, Brian FitzGerald wrote:
>
> Hey all, I'm banging my head against the wall here with something that
> seems so simple. I'm sure I'm doing something silly.
>
> I'm working with a Quiz object which has a QuestionType object as a
> child.
>
> <object name="Quiz" table="quiz">
> <id name="quizId" type="numeric"/>
> <manytoone name="questionType">
> <link to="question.QuestionType" column="questionTypeId" />
> </manytoone>
> </object>
>
> What I want to change in the db is the value of the questionTypeId on
> the Quiz record from 1 to 2.
>
> quiz.getQuestionType().setQuestionTypeId(2);
> transfer.save(quiz);
>
> this does change the value in the child object, but when I save, the
> value in the db is not updated. Am I doing something wrong?
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---