For some reason @OneToOne persists child with parent's node as NULL
@Entitypublic class Customer { @Id Integer id; String name; @OneToOne(cascade=CascadeType.ALL, mappedBy="customer") Order order;...}
@Entity@Table(name="orders")public class Order { @Id Integer id; String name; @OneToOne Customer customer;...}
main:EbeanServer server = EbeanServerFactory.create(config); Customer c = new Customer(); c.setName("CName"); Order o = new Order();o.setName("OName"); c.setOrder(o); server.save(c);
in result Order is persisted with customer_id as null