1

I have a JPA column that Im GOING to mark as @Transient. But I do have some data in that field that I want to move later.

I know that @Transient won't persist. But, can I still load those existing data to the memory to the Java world?

ssdehero
  • 786
  • 1
  • 11
  • 26

1 Answers1

4

No @Transientprevents JPA/Hibernate from any data access operation.

But if you have a field that you only want to read you can mark it read-only:

@Column(insertable = false, updatable = false)
private String transientField;
Simon Martinelli
  • 34,053
  • 5
  • 48
  • 82