Design to implemente Cloneable in POJOs

How to design objects in ORM (using DBVA-EC) to generate POJOs that implemente Cloneable?

Hi Santm,

Thanks for your post. We support POJO but it’s not cloneable, would you mind tell me why you would like to generate POJO that implement cloneable?

Best regards,
Lilian Wong

We wish to have POJOs that implement Cloneable interface so that we can clone the object i.e., make a field-for-field copy of instances of that class.

We can still copy the objects instead of using object.clone() but thats not the standard practice here.

Hi Santm,

Sorry for my late response. I’ve fired a feature request about support cloneable implementation on POJO generation. If there is any feedback from our engineers, I’ll come back to your immediately.

BTW, if you want to generate POJO (not cloneable), please select “POJO” in Persistent API inside the Database Code Generation dialog (see image).

If there is any further inquiry, please do not hesitate to contact me.

Best regards,
Lilian Wong


persistent_api.png

In fact we always use POJ in persistent API. I am wondering why it was mentioned here?

Hi user,

I mention how to generate POJO so that other users who read this topic will know as well.

Best regards,
Lilian Wong