FAQ
I´m using the Cayenne´s Transaction class, I have to commit object´s context
during the operation? I mean... I have related objects and I want to set a
field in second object which is the ID of the first one ... And I´m getting
a nullpointer exception... I´ve already tried to commitContext() before the
first Insert on DB, but unfortunately with no success .

Can you help me please?

Thks in advance!


--
View this message in context: http://cayenne.195.n3.nabble.com/Transaction-Fails-NullPointerException-related-objects-tp4024256.html
Sent from the Cayenne - User mailing list archive at Nabble.com.

Search Discussions

  • Michael Gentry at Jun 13, 2012 at 12:48 pm
    Hi there,

    Could you post some code? Normally you just set the relationships
    before you commit and Cayenne does the rest.

    mrg

    On Mon, Jun 11, 2012 at 10:47 AM, inovation wrote:
    I´m using the Cayenne´s Transaction class, I have to commit object´s context
    during the operation? I mean... I have related objects and I want to set a
    field in second object which is the ID of the first one ... And I´m getting
    a nullpointer exception... I´ve already tried to commitContext() before the
    first Insert on DB, but unfortunately with no success .

    Can you help me please?

    Thks in advance!


    --
    View this message in context: http://cayenne.195.n3.nabble.com/Transaction-Fails-NullPointerException-related-objects-tp4024256.html
    Sent from the Cayenne - User mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriescayenne
postedJun 11, '12 at 2:48p
activeJun 13, '12 at 12:48p
posts2
users2
websitecayenne.apache.org

2 users in discussion

Inovation: 1 post Michael Gentry: 1 post

People

Translate

site design / logo © 2021 Grokbase