Reputation: 1
//1. Person Entity
class Person {
private Integer id;
private String name;
Private Address addId;
}
//2. Address Entity
class Address {
private Integer addId;
private String city;
Private String state;
Private String country;
Private Integer zip;
}
Upvotes: 0
Views: 364
Reputation: 1893
Currently R2DBC doesnt support annotation such as @OneToMany. So in Address you shuld have a property called userId of type Integer and pertsist Person and then persist Address. And to get them you should first get the Person and find the Address by the userId
Upvotes: 0