Witam
mam problem, a hibernate nie do końca chce powiedzieć po co chodzi
Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization
mam dwa obiekty w realji OneToOne
@XmlRootElement
@Entity
@Table(name = "tabA")
public class defA {
@Id
@Column(unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
@XmlTransient
public Integer id;
@XmlElement
@Column
public String name_a;
@XmlElement
@OneToOne(mappedBy = "obA")
public defB obB;
}
@XmlRootElement
@Entity
@Table(name="tabB")
public class defB {
@Id
@Column
@GeneratedValue(strategy=GenerationType.IDENTITY)
@XmlTransient
public Integer id;
@GenericGenerator(name="defAGenerator", strategy="foreign",
[email protected](name="property", value="objA"))
@GeneratedValue(generator="defAGenerator")
@Column
@XmlTransient
private Integer parent_id;
@XmlTransient
@JoinColumn(name = "parent_id", referencedColumnName = "id", updatable = false, insertable = false, nullable=false)
@OneToOne
public defA objA;
@XmlElement
@Column
public String name_b;
obiekt defA razem z zawartym w sobie defB jest wysyłany na webserwis - odczyt poszczególnych właściwości name_a i name_b jest prawidłowy, problem się pojawia w momencie zapisu tej struktury do tabel tzn. entitymenager.persist(defArequestObject)
Gdzie tkwi błąd? (tomee, jta)