How to insert only some of the attributes

Asked

Viewed 50 times

0

I am using JPA with eclipse link, wanted to insert only some data into the database, some of the attributes are not necessary to save, as I could do this?

1 answer

1


use the JPA @Transient Annotation in the property you do not want to serialize(not persist), e.g.:

import javax.persistence.Transient;

@Transient
private String zip;

Annotation Type Transient

Browser other questions tagged

You are not signed in. Login or sign up in order to post.