@Embeddable class containing type of its own [message #1349686] |
Mon, 12 May 2014 09:54 |
Murthy Bhat Messages: 159 Registered: July 2009 |
Senior Member |
|
|
Hello,
I have a case where I have self containment relationship which I have described using annotations. Below is my class structure
@Entity
@NoSql(dataFormat = DataFormatType.MAPPED)
public class MySystem implements Serializable{
@ElementCollection
List<Folder> folders = new ArrayList<Folder>();
}
@Embeddable
@NoSql(dataFormat = DataFormatType.MAPPED)
public class Folder implements Serializable {
@ElementCollection
List<Folder> subFolders = new ArrayList<Folder>();
}
However with the above case, my persistence logic runs into an infinite loop. Could someone please help me to embed self type of entities.
Thanks for help.
Cheers,
Murthy
|
|
|
Powered by
FUDForum. Page generated in 0.06561 seconds