0

I want to generate with com.sap.cloud.sdk.datamodel:odata-generator-maven-plugin:4.20.0 a Java client and all the generated classes must implement the interface Serializeable.

How can I instruct the generator to do this?

BR, Thomas

1 Answers1

0

The POJOs generated by the Cloud SDK's OData (both V2 and V4) generators cannot be configured/tweaked to implement the Serializable interface.

However, all generated POJOs are indeed serializable using either Gson or Jackson out of the box.

  • I want to use this generated client in an applicationserver and therefore it is necessary that the objects can be de/serialized with the Java object serialization to persist the state in specific situations. Are there any plans to enable the generator for this or any other solutions? – Thomas Ullrich Aug 18 '23 at 09:18
  • 1
    As of now, there are no plans for enabling this. However, this is also the first time I hear about this requirement. I can bring this request to our product owner, but since we are working on our next major version release, chances are not too high that this is getting implemented, I fear. – Johannes Schneider Aug 18 '23 at 11:02