Application Development 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: 

Add attribute to generated persistent class - with references

Former Member
0 Kudos

Hi there,

i'm working with generated persistent classes where I use object references to an other generated class.

My example:

The table OBJECT contains a foreign key of the table OBJECTTYPE. I generated them over the persistence manager in SE24 - and it works.

Now added another field over SE11 to the table OBJECT. Then I want to add this field as attribute to the persistence class belated.

If I want to activate the class I get an error: "Only methods of the superclass can be redefined".

I could not change atrributes of a class, which accesses object references to other persistent classes!? I have to generate everything again!?

Or I have to do some changes in the Agent or the Base Agent?

Thanks for some help,

Andreas

5 REPLIES 5

custodio_deoliveira
Active Contributor
0 Kudos

You just have to go back to the persistence screen and add the attribute.

0 Kudos

Hi Claudio,

thanks for this very fast reply!

But I go back to the persistence screen and then I could see the new field of the table.

When I add this as an attribute I get the error - because in this class is an object reference of another class..

0 Kudos

Oh... did not understand at first. Sorry, can't help you here

0 Kudos

Ah, okay.

I want to redefine a class, which has a key/object reference of another class.

I think here is an other description of the problem - and a solution, but not while using the generator of persistent classes.

naimesh_patel
Active Contributor
0 Kudos

Hello Andreaz,

When you add new fields to the table after you have generated the Persistent class, you need to visit the "Persistent Representation" and include the newly added fields.

Thanks,
Naimesh Patel