Primary Key Access and Exposed Primary Keys

From: Andrew Lindesay (ap..indesay.co.nz)
Date: Mon May 03 2010 - 18:55:10 EDT

  • Next message: Marcin Skladaniec: "Re: Primary Key Access and Exposed Primary Keys"

    Hello;

    There is probably a simple answer to this.

    I am trying to use the following EJBQL to get the PK;

            String queryS = "SELECT o."+XYZDataObject.ID_PROPERTY+" FROM "+XYZDataObject.class.getSimpleName()+" o WHERE o."+XYZDataObject.MODIFY_TIMESTAMP_PROPERTY+" > ?1";

    From this I can make OID's and then allow a batch process to work through the OID's faulting them.

    The problem is that by exposing the "ID_PROPERTY", Cayenne (as with EOF) appears to stop automatically creating primary keys from sequences.

    My question is;

    * is there a means by which I can allow Cayenne to continue to allocate primary keys despite exposing the key?
    * is there a means by which I can get the key without exposing it in the object model?

    Thanks for any help.

    cheers.

    ___
    Andrew Lindesay
    www.silvereye.co.nz



    This archive was generated by hypermail 2.0.0 : Mon May 03 2010 - 18:55:52 EDT