I know that could be a stupid question, but I didn’t find nothing about this, to understand how do it and understand if there is a fast mode.
I am writing a function into service bean, it receive an id parameter of column a table, using EntityManager I load an instance of entiy using find method. Now I need to do a clone this entity instance, change few fields on new instance, and insert new row into table database. Column id of table is managed like integer auto incremental.
I know that I can create a new object and then assign all fields variable manually, but I’d like use a dynamic method, without maintenance function copy each time that add a new field.