In order to speed-up everything I would like to add log entities related to a device without touching (locking) the device entity. How can I do this with ObjectDB using @JoinColumn(name = "device") because I don't have a back reference from log to device!
-----
@Entity public class Device { @Id @GeneratedValue private long id; @OneToMany(fetch = FetchType.EAGER, cascade={CascadeType.ALL}, orphanRemoval=true) @JoinColumn(name = "device") private List<Log> logs = new LinkedList<Log>(); } @Entity public class Log { @Id @GeneratedValue private long id; private LocalDateTime dateTime = null; @Enumerated(EnumType.STRING) private Level level = null; private String message = null; }