Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

[PERSISTENCE CLASS] Method : CREATE_PERSISTENT

Former Member
0 Likes
994

Hi Gurus,

I created a persistence class quite correctly following a tutorial. Afterwards, when I call the method to create my persistence class through  "CREATE_PERSISTENT" method from my Actor class, I do not have any attributs of the class available.

Please, see my Class Representation:

The code generated when using "create_persistent":


DATA: actor   TYPE REF TO zca_persis_test,
            student TYPE REF TO zcl_persis_test,
            ref1    TYPE REF TO object.

actor = zca_persis_test=>actor.

   CALL METHOD actor->create_persistent
   RECEIVING
*      result =     " Newly Generated Persistent Object
   .
*    CATCH cx_os_object_existing.    " Object Services: Object Exists

In fact, I am expecting to have this generated code:


CALL METHOD actor->create_persistent
   RECEIVING

         NOM =

         PRENOM =

         INSCRIPTION =

         AGE =
*      result =     " Newly Generated Persistent Object
   .
*    CATCH cx_os_object_existing.    " Object Services: Object Exists

 

Have you got some idea regarding why all my attributs seems to be in private ?

Best regards.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
777

Can you share the generator settings of the "Persistence (O-R)" mapping?

I suspect that this might be because you have checked the - indicator for minimum interface.

BR,

Suhas

2 REPLIES 2
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
778

Can you share the generator settings of the "Persistence (O-R)" mapping?

I suspect that this might be because you have checked the - indicator for minimum interface.

BR,

Suhas

Read only

Former Member
0 Likes
777

Bingo Suhas Saha !

Thank you very much.

BR/

Rachid.