Wydaje mi się uzyskać wyjątek ConcurrentModificationException, gdy mam CollectionOfElements wewnątrz Embedabble.java.util.ConcurrentModificationException na CollectionOfElements
Jeśli chciałbym, aby tak było, jednak jeśli zmienię trasę z Embedabble na Entity, to wszystko działa dobrze. Próbowałem nawet dodać @Version, ale to nie działa.
Oto fragment moich zajęć. Kart.java:
@Entity
public class Kart {
@Id @GeneratedValue
private Long id;
@Column(nullable=false,length=256)
@NotNull
@Length(max=256)
private String name;
@OneToOne(cascade=CascadeType.ALL)
private File file;
@Version
private int version;
@CollectionOfElements
private Set<Route> route;
Route.java:
@Embeddable
public class Route {
@Parent
private Kart kart;
@NotNull
@Column(nullable = false, length = 256)
private String name;
@NotNull
@Column(nullable = false)
private Boolean visible = Boolean.valueOf(true);
@CollectionOfElements
private Set<Coordinates> coordinates;
@Version
private int version;
Coordinates.java:
@Embeddable
public class Coordinates {
@NotNull
private int x;
@NotNull
private int y;
@Parent
private Route route;
@Version
private int version;
I generowane Kod źródłowy/wynosi dla współrzędnych i Route
Czy możesz pokazać nam ślad stosu i powiązany kod (jeśli nie pokazano tutaj)? –