1 year ago
#75439

Z-100
Are Objects inside of other objects being saved to the database?
I hope someone understands, what I mean by this question. I try to explain it as good as possible:
I want to save an object, which is a JPA-entity to the database, by using
accountRepository.save(account);
Are other objects (member & house), being present in List<> on the account entity (Due to a M:1 relationship), saved too, or is it just the attributes being saved, with me manually having to write houseRepository.save(house);
and then getting this specific house and adding it to the account entity that way?
java
database
spring-boot
jpa
mariadb
0 Answers
Your Answer