How to insert only some of the attributes

0

I'm using JPA with eclipse link, I wanted to insert only some data in the database, some of the attributes do not need to save, how could I do this?

    
asked by anonymous 13.08.2016 / 06:57

1 answer

1

use the @Transient annotation of JPA on the property you do not want to serialize (do not persist), eg:

import javax.persistence.Transient;

@Transient
private String zip;

Annotation Type Transient

    
13.08.2016 / 15:12