RegisterObjet (for a new object) return a clone form a different object

Hello,
when I register a new object with registerObject method, I sometimes receive an object from the same class but a clone from an other objet.
How is that possible ?
thanks
Annabelle

Hello Annabelle,
When you call registerObject(someObject), TopLink will perform an existence check to see if the object passed in is new or existing, then return a working copy of the object passed in. It the object was previously registered, it will pass the same working copy back, otherwise, it will clone the object passed in to use as the working copy.
Are you using sequencing?
If registerObject is passing back the same working copy for multiple new objects, there might be a problem with the object's primary key - which is used for identity.
Try printing off what is in the identity maps using the session.getIdentityMapAccessor().initializeIdentityMaps() api on the UnitOfWork. This should show all the objects in the cache as well as the primary keys they are cached under, which might help to identify the problem object and how it got in the cache.
Best Regards,
Chris

Similar Messages

  • TopLink does not generate SQL statements for inserting new objects

    TopLink does not generate SQL statements for inserting new objects. Why?
    Thanks in advance...

    Please see the response in
    Why does not unitofwork.commit write data to the database?
    Regards,
    Chris

  • How should i get the delta data for those new object's previous delta data?

    Hallo all,
    i have 2lis_11_vahdr and i am using a standard and loading delta! now i have appended some new fields in the datasource then in infosource then in ods and infocube..! now how should i get the delta data for those new object's previous delta data???
    Jimmy

    Hi,
    After appending new fields in the datasoure.It is not possible to delta load, u should have to load everything
    Thanks,
    Shreya

  • Tcode for creating new page size in smart forms

    dear friends ,
    can any one tell me the tcode for creating new page size in smart forms.
    thanks&regards
    veerachamy

    page formats?
    check in SPAD.
    Regards
    Prabh

  • Why do we allocate space for a new object???

    When we create a new object, we instantiate it. Why do we do this. I read that we are allocating space for it. What is allocating space and why is it necessary??

    Okay, say you have an object called Stick, which descibes a physical stick's characteristics:
    class Stick
         private int length;
         Stick()
              //unparameterized constructor
              length = 1;
         Stick(int l)
              //parameterized constructor
              length = l;
         public int getLength()
              return length;
    Pretty basic, right? Okay, looking at this code, you might say "well this is a class, not an object because it describes something, it's not an actual instance of the class". Right. So what people do is they instantiate things like Stick() into a static class (such as main) like so:
    class Thingy
         public static void main(String args[])
              Stick s1 = new Stick();          //calls the unparameterized constructor
              Stick s2 = new Stick(4);     //calls the parameterized constructor
              System.out.println("Stick 1's length is "+s1.getLength());
              System.out.println("Stick 2's length is "+s2.getLength());
    The unparameterized constructor line creates an instance (which is the same thing as an object) of class Stick using no parameters. The parameterized does the same, only it uses a length of 4 instead of the default 1 that the other constructor uses. The two instances s1 and s2 use the same class template, and can call the same methods, such as getLength(), but they contain different information in their data fields, for example "length" in class Stick. And that's how constructors work, and why they're useful. They're all about deriving a useful instance from either limited or abundant information.

  • Services for a New Object

    Helo community:
    We have created a new object ("8C - job family") , this object is a copy of object "C" job,  we have done the customizing, for example in table: T778O and we have filled it with:
    8C     Familia de Funciones     PDOTYPE_C     ICON_ISO_CODE
    So, the question is when we create a new object in PP01, we want to create an attachment, but the options are disabled. Somebody knows how we should enabled these options?.
    Thanks in advance,
    Fabiaa

    Microsoft confirmed I have figured out the answer if you are having
    an issue when your nested cluster breaks when you move your VM guest to the other host...(Below) 
    A nested cluster heartbeat network has to be setup...
    Meaning not only does the nested HB have to communicate between its nodes (classic HB situation), but the HB also has to communicate to each host or communication is lost.
    how to:
    Present a physical nic to both hosts
    Create a new virtual switch for both hosts pointing to the new nics (this will create virtual nics to add to your vm guests)
    This also creates a virtual nic on both hosts (because the physical nic is being presented to hyperv)
    Add nics to both guests in the nested cluster
    Set IP's on all four nics (hosts and guests)
    Creating a subnetted network between all 4 nics (Ping making sure you can communicate all around)
    Now you will be able to fail one member of your nested cluster to the other host without breaking the nested cluster.
    Communication between the host which does not own the guest is the key.

  • How can I automate an email for those new leads captured with my form contact?

    I need to set up an automatic mail response for my new leads (submitted with a contact form).  My website: networkarte.com
    How can I do it? Thanks in advance.
    Diego.

    Oh excellent!
    Thank you very much, Anton!
    Best regards,
    Diego.

  • String contains class name: how to use it for creating new objects

    Hi All
    I've seen things like this in scripting languages, so I was wondering if things like this are possible in java. Here is an not working example:
    String s = "MyClass" ;
    MyClass mc = new s() ; // or: s mc = new s() ;
    if ( mc instanceof s ) { ..... }
    Is something like this possible ?
    Thnx in advance
    LuCa

    jeanluca wrote:
    I've seen things like this in scripting languages, so I was wondering if things like this are possible in java. Here is an not working example:
    Is something like this possible ?AFAIK, it is only possible in a very limited way as noted above and is nearly always not recommended and definitely not necessary. The variable name has little importance, but OTOH the object reference has great importance. Instead learn about arrays, Lists, and Maps.

  • Add New Object in a DMS Object Link

    Hi everybody,
    i am trying to create an object link to Service Entry Sheet.  (tcode: ML81N, ESSR-LBLNI)
    by sap instructions i did this step:
    "You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140 .
    The processing logic must follow that of screen 1204 in program SAPLVC130."
    and this step:
    Create function module OBJECT_CHECK_XXXX (XXXX = ESSR ) which i have copied from OBJECT_CHECK_EQUI .
    I have done above step .
    I created Screen For SAPLCV130 and SAPLCV140 with screen No 1272. give same flow logic of screen 1204.
    I created Function Module OBJECT_CHECK_ESSR.
    After this What I have to do for displaying  ESSR object in DMS as Object Link. 
    Please Guide me as soon as possible.
    Thanks
    Pranesh

    Hi,
    Since I think you already followed the below steps :
    1. In the standard system, there are already two special screens for the module pools SAPLCV130 and SAPLCV140 for the linked SAP object.
    You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140. The processing logic must follow that of screen 1204 in program SAPLVC130.
    2. Create function module OBJECT_CHECK_XXXX (XXXX = object name) If the object can be classified, this function module already exists .
    Otherwise copy the function module for linking equipment DOCUMENT_CHECK_EQUI and change it as required for the new object.
    Kindly go through the below once :
    Link :[http://help.sap.com/erp2005_ehp_02/helpdata/en/2c/3fe93bad3ce333e10000000a114084/frameset.htm].
    you define the object link in DMS customizing
    e.g.For EBAN maintain screen number 247 in "Maintain view for screens to DMS object links" Then link EBAN to your document type
    Hope it helps you.
    Thanks
    Arbind
    Edited by: Arbind Prasad on Feb 24, 2011 5:46 PM

  • How to Add New Object?

    HI,
    Any body can say how to add new object. For Example: The Document need to link with Invoice Transaction (T.Code: VF01, Table: VBRK/VBRP).
    Points will be rewarded, if information is useful.
    Tks
    Mani.

    Hi
    You can create New objects using the T.code: SE80.
    You can make an object link to SAP objects that are not shown in the possible entries list. To do this, proceed as follows:
    1. In the standard system, there are already two special screens for the module pools SAPLCV130 and SAPLCV140 for the linked SAP object.
    You must create two new screens with the same number for the module pools SAPLCV130 and SAPLCV140. The processing logic must follow that of screen 1204 in program SAPLVC130.
    2. Create function module OBJECT_CHECK_XXXX (XXXX = object name) If the object can be classified, this function module already exists .
    Otherwise copy the function module for linking equipment DOCUMENT_CHECK_EQUI and change it as required for the new object.
    Regards
    S.Sivakumar
    Reward points if useful----

  • Naming new objects

    I'm a newb to Java (and programming in general) and I was wondering if anyone could help.
    What I need to make is a bank program that can have an unlimited amount of accounts added to it. Each account is supposed to be an object. The problem i'm having is how to do the unlimited part. I'm creating the objects using the following
    BankAccounts account1 = new BankAccount();
    But what I need is too be able to change "account1" to "account2" and so on for each new object created. any help?

    Instead of changing the name of each object you can add a parameter as account name in the class BankAccount() and every time you create a new object set the name attribute different for that object which can be the loop number...
    ArrayList arr = new ArrayList();
    for(int i=0;i<anyNumber;i++){
    BankAccount account = new BankAccount();
    account.name = "account"+i;
    arr.add(account);
    }In this way when later on you fetch out the objects from the list you can differentiate between each account on the basis of the name property..

  • Not sure on how to return a new object

    hi i am not sure on how to return a new Set object, i am not asking how to code this, i just don't exactly know what to write after "return.." to return a new object ...that part of the code is towards the bottom where i put arrows.....this is the skeleton of the code:
    public class Set
         // define fields here
         public Set(int maxinteger)
              // complete this method
         public boolean add(int integer)
              return false; // replace this line with your code
         public boolean remove(int integer)
              return false; // replace this line with your code
         public boolean contains(int integer)
              return false; // replace this line with your code
         public int size()
              return 0; // replace this line with your code
         public String toString()
              return null; // replace this line with your code
         public void addAll(Set other)
              // complete this method
    --------->     public Set subset(int min, int max)
              return null; // replace this line with your code
    ----------->     public Set intersection(Set other)
              return null; // replace this line with your code
    ------------->     public Set difference(Set other)
              return null; // replace this line with your code
         }

    well, when you use return is when trying to make a method have a value that have to be returned from it.
    In your case you have a Set CLASS, with methods, some methods have to return Strings, ints, Objects, etc.
    just make sure that you are returning the same type of value than the method say.
    the method parts are:
    modifier returnType name (parameters) {
    . code
    modifiers are public, private, etc.
    the return type specifies what the method will return, for example:
    public String toString () {
    must return a String value.
    to return a new Object just do it like a simple value, Strings are objects.
    just define a Set object and then return it.

  • Adding new object type (field BKPF-AWKEY) for BAPI posting

    Hi everyone,
    I am posting to SAP GL using an input file to read the data and transfer it to BKPF and BSEG tables.
    The problem is I have to use BAPI_ACC_DOCUMENT_POST, and it expects values for OBJ_KEY and OBJ_TYPE.. For now, OBJ_TYPE creates a problem, because if I use BKPF, it says it cannot post using this object type, as it is for SAP internal use only.
    Does anyone know how to add a new object type for the customer namespace, which can be manually used for this kind of posting? I know that the new entry must be made in tables TTYP, TTYPT, and possibly TTYPV, for which the maintainence view exists: V_TTYPV.
    How to add an entry here, or where can I find it in customizing?
    All helpful answers will be awarded.
    Thank you very much
    Srdjan

    perform fill_internal_tables.
    if check_l = 'X'.
      call function 'BAPI_ACC_DOCUMENT_CHECK'
           destination dest
           exporting
                documentheader    = gd_documentheader
                customercpd       = gd_customercpd
                contractheader    = gd_fica_hd
           tables
                accountgl         = it_accountgl
                accountreceivable = it_accountreceivable
                accountpayable    = it_accountpayable
                accounttax        = it_accounttax
               currencyamount    = it_currencyamount
                criteria          = it_criteria
                valuefield        = it_valuefield
                extension1        = it_ext
                return            = it_return
                paymentcard       = it_paymentcard
                contractitem      = it_fica_it.
               extension2        = it_ext2
               realestate        = it_re.
      write: / 'Result of check lines:'.                        "#EC NOTEXT
      perform show_messages.
    endif.
    if check_a = 'X'.
      call function 'BAPI_ACC_DOCUMENT_CHECK'
        destination dest
        exporting
          documentheader    = gd_documentheader
          customercpd       = gd_customercpd
          contractheader    = gd_fica_hd
        tables
          accountgl         = it_accountgl
          accountreceivable = it_accountreceivable
          accountpayable    = it_accountpayable
          accounttax        = it_accounttax
          currencyamount    = it_currencyamount
          criteria          = it_criteria
          valuefield        = it_valuefield
          extension1        = it_ext
          return            = it_return
          paymentcard       = it_paymentcard
          contractitem      = it_fica_it.
         extension2        = it_ext2
         realestate        = it_re.
      write: / 'Result of check all:'.                          "#EC NOTEXT
      perform show_messages.
    endif.
    if post = 'X'.
      data: l_type like gd_documentheader-obj_type,
            l_key  like gd_documentheader-obj_key,
            l_sys  like gd_documentheader-obj_sys.
      if dest = space or
         dest = gd_documentheader-obj_sys.
       post synchron
        call function 'BAPI_ACC_DOCUMENT_POST'
          exporting
            documentheader    = gd_documentheader
            customercpd       = gd_customercpd
            contractheader    = gd_fica_hd
          importing
            obj_type          = l_type
            obj_key           = l_key
            obj_sys           = l_sys
          tables
            accountgl         = it_accountgl
            accountreceivable = it_accountreceivable
            accountpayable    = it_accountpayable
            accounttax        = it_accounttax
            currencyamount    = it_currencyamount
            criteria          = it_criteria
            valuefield        = it_valuefield
            extension1        = it_ext
            return            = it_return
            paymentcard       = it_paymentcard
            contractitem      = it_fica_it.
           extension2        = it_ext2
           realestate        = it_re.
        write: / 'Result of post:'.                             "#EC NOTEXT
        perform show_messages.
      else.
      create Idoc
        it_receivers-logsys = dest.
        append it_receivers.
        call function 'ALE_ACC_DOCUMENT_POST'
          exporting
            documentheader    = gd_documentheader
            customercpd       = gd_customercpd
            contractheader    = gd_fica_hd
          tables
            accountgl         = it_accountgl
            accountreceivable = it_accountreceivable
            accountpayable    = it_accountpayable
            accounttax        = it_accounttax
            currencyamount    = it_currencyamount
            criteria          = it_criteria
            valuefield        = it_valuefield
            extension1        = it_ext
            paymentcard       = it_paymentcard
            contractitem      = it_fica_it
           extension2        = it_ext2
           realestate        = it_re
            receivers         = it_receivers
          COMMUNICATION_DOCUMENTS =
          APPLICATION_OBJECTS     =
          exceptions
            error_creating_idocs    = 1
            others                  = 2  .
        if sy-subrc = 0.
          write: / 'IDoc created'.                              "#EC NOTEXT
        else.
          write: sy-msgid.
        endif.
      endif.
    endif.
    if rev_p = 'X' or rev_c = 'X'.
      data: rev like bapiacrev,
            rev_key like ref_key.
      rev_key       = ref_key.
      rev_key(1)    = 'R'.
      rev-obj_type  = gd_documentheader-obj_type.
      rev-obj_key   = rev_key.
      rev-obj_sys   = gd_documentheader-obj_sys.
      rev-obj_key_r = ref_key.
      if rev_c is initial.
        if dest = space or
           dest = gd_documentheader-obj_sys.
          call function 'BAPI_ACC_DOCUMENT_REV_POST'
            exporting
              reversal = rev
              bus_act  = gd_documentheader-bus_act
            tables
              return   = it_return.
        else.
          it_receivers-logsys = dest.
          append it_receivers.
          call function 'ALE_ACC_DOCUMENT_REV_POST'
            exporting
              reversal                      = rev
              busact                        = gd_documentheader-bus_act
            OBJ_TYPE                      = 'BUS6035'
            SERIAL_ID                     = '0'
            tables
              receivers                     = it_receivers
            COMMUNICATION_DOCUMENTS       =
            APPLICATION_OBJECTS           =
            exceptions
              error_creating_idocs          = 1
              others                        = 2
          if sy-subrc <> 0.
            message id sy-msgid type sy-msgty number sy-msgno
                    with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          else.
            write: / 'IDoc created'.                            "#EC NOTEXT
          endif.
        endif.
      else.
        call function 'BAPI_ACC_DOCUMENT_REV_CHECK'
          exporting
            reversal = rev
            bus_act  = gd_documentheader-bus_act
          tables
            return   = it_return.
      endif.
      write: / 'Result of Reversal Posting:'.                   "#EC NOTEXT
      perform show_messages.
    endif.
    commit work.
    chk this
    Give points if useful

  • Clone a method for my custom object.

    Hi!
    We have a method:
    comp.saveFrameToPng(compTime, fileObj);
    I have my custom object block.
    Is it possible to clone "saveFrameToPng" method for my custom object?
    I've tried:
    Function.prototype.clone = function() {
        var that = this;
        var temp = function temporary() { return that.apply(this, arguments); };
        for(var key in this) {
            if (this.hasOwnProperty(key)) {
                temp[key] = this[key];
        return temp;
    And then in my custom object:
    function block (comp)
    this.saveFrame = comp.saveFrameToPng.clone();
    But thin won't work properly
    Help me please if this possible.
    Thank you in advance!

    Hi
    static public long powerTwo(long number)
         long ret = 2;
         if(number == 0)
              return 1;//2 to the power of 0 is 1
         else
                    //use a for loop to loop as many times as specified by number,
                    //times 2 to ret every time it loops
         return ret;//return the answer
    }Hope this helps

  • Can I return my macbook for a new one?

    The rumors are that the new Lion comes out this week, i just bought a macbook pro last week and its has the current OS can i got to the store and return my macbook for the new one with the new system?

    Lion Up-To-Date upgrade
    "The Mac OS X Lion Up-To-Date upgrade is available at no additional charge via the Mac App Store to all customers who purchased a qualifying new Mac system from Apple or an Apple Authorized Reseller on or after June 6, 2011. Users must request their Up-To-Date upgrade within 30 days of purchase of their Mac computer. Customers who purchase a qualifying Mac between June 6, 2011 and the date when Lion is available in the Mac App Store will have 30 days from Lion’s official release date to make a request." See below:
    OS X Lion - Get up to date

Maybe you are looking for

  • Need help to import and syncronize HCM pagelets with Interaction Hub, how can I do that?

    Hi, I need help to import and synchronize HCM pagelets with Interaction Hub, how can I do that? The default page "Select Remote Content" of the WorkCenter "Unified Navigation WorkCenter" is not working as well, when I run the import/sync button I get

  • Error while creating SQL Subscription control in Web Analysis...

    Hi, I created a report using SQL Spreadsheet object. I want to associated a filter for this result set so that the user can use a drop down box to select the desired date. When I drag and drop the SQL Subscription control it prompts me to select a da

  • Adobe Acrobat Pro 9... malfuncting!

    Need help... Just recently something happened, and can't find what to do. For a while, I was not able now, to print to my HP Officejet 7310 printer. Cannot print anything from Safari, Pages and Photoshop either at this point. But, the main problem is

  • How to join tables from different databases (DBLink/DB connection )

    Hello, i have an issue and i hope you could help me to solve it. My problem is: I want to create native sql select which joins two tables from different DB (both of them are ORACLE, one of them internal, another one - external). I have found several

  • Pages disappear

    I'm working on a 20 page photo book that I am putting together for a trip. I was going through the pages and needed to adjust one of the pictures on page 8. When I move the picture (on page 8) pages 12-20 just disappear. If I move the picture back or