CHHIBI AMOR
CHHIBI AMOR

Reputation: 1265

Auto fill a table after creation jpa

I want to populate the table after his generation from the @Entity Class. I want to know if this is possible with JPA and how can I do it .

Upvotes: 0

Views: 654

Answers (1)

user3252538
user3252538

Reputation: 110

Unfortunately, Hibernate has @Generated annotation but JPA doesn't have it and there is no alternative to it. You can also try to apply @PrePersist annotation before EntityManager persists your object.

Upvotes: 1

Related Questions