I need help to define correctly a @OneToMany JPA annotation. Tried different ways but still get error/issues like the foreign key (visitor_revision_id) is null in the visit
Without a test case showing the failure its difficult to tell.
Here are some things you can try:
add , nullable = false to the join column annotation on VisitorCharacteristic
set the relationship in both directions
Visitor v = new Visitor();
VisitorCharacteristic vc = new VisitorCharacteristic();
v.setVisitorCharacteristicList(Arrays.asList(vc));
vc.setVisitor(v);