ich erhalte folgende Error-message (s.u.), wenn ich auf meine getChildren() Methode meiner TreeNode-Klasse zugreifen will. Hier der Code:
Code (Text):
@Entity
@Transactional
public class TreeNode implements Serializable{
@Id
@GeneratedValue
protected Long id;
protected String name="";
@ManyToOne
protected Device device = null;
@ManyToOne
@JoinColumn(name="parent_id")
protected TreeNode parent = null;
@OneToMany(mappedBy="parent", fetch...
@Transactional
public class TreeNode implements Serializable{
@Id
@GeneratedValue
protected Long id;
protected String name="";
@ManyToOne
protected Device device = null;
@ManyToOne
@JoinColumn(name="parent_id")
protected TreeNode parent = null;
@OneToMany(mappedBy="parent", fetch...
JPA org.hibernate.LazyInitializationException / Spring @Transactional
0 commentaires:
Enregistrer un commentaire