Re: DataObject states

From: Dhruti Ramani (dhrutiraman..ahoo.com)
Date: Thu Jul 07 2005 - 07:57:27 EDT

  • Next message: Daniel Lorimer: "Re: Parenthesis in queries."

    that other line was redudant, i forget to delete that. I have printed out the lines after commit too. It prints the User with state "modified" but there is no data in the database.
     
    We were doing other testing with JBPM and it seems like this has to do with JBPM not with cayenne, may be its jbpm's limitation or something. So we found another way and its working now.
     
    Thanks,
    Denna

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    Denna,

    I don't know much about JBPM and how it affects your processing

    > setPrimaryContact(aUser);
    > aUser.addToDealsForPriContact(this);

    These two lines seem redundant (first one should automatically create
    reverse relationship), but they are still correct and shouldn't cause
    any problems...

    > {
    > String aUserRole="Sales Team";
    > SystemUser aUser=getNextUserFromUserRole(aUserRole);
    > //System.out.println(aUser);
    > setPrimaryContact(aUser);
    > aUser.addToDealsForPriContact(this);
    > dataContext.commitChanges();
    > }

    > But in our real application we are using JBPM(Java Business Process
    > Management) workflow. If I call this method from workflow xml then
    > it won't work. I am not getting any error or any message but if i
    > print primary contact right after setting it, state is "modified",
    > but there is no data in database.(I am using postgresql)

    I know nothing about JBPM.... But what's important is whether the
    data gets to the database AFTER the commit. Of course you won't see
    any changes until they are saved. Your print statement is before the
    commit, try also checking it after. Also do you see Cayenne-generated
    SQL output - I wonder what is printed during the commit?

    Andrus

                    
    ---------------------------------
     Sell on Yahoo! Auctions - No fees. Bid on great items.



    This archive was generated by hypermail 2.0.0 : Thu Jul 07 2005 - 07:57:30 EDT