i want to marshal following entity with Castor using static Marshall method. However as entity has references to itself so it starts looping and from 44 DB rows it builds me 100MB file if doesn't crash. @XmlTransient on properties didn't helped. ORM is eclipseLink, EJB 3 (ADF 11.1.2.1.0)
@Entity
@NamedQueries( { @NamedQuery(name = "MenuItems.findAll", query = "select o from MenuItems o") })
@Table(name = "MENU_ITEMS")
public class MenuItems implements Serializable {
@Column(nullable = false, length = 4000)
private String definition;
@Column(nullable = false)
private String description;
@Column(name = "DISPLAY_SEQ")
private BigDecimal displaySeq;
@Column(length = 64)
private String key;
@Id
@Column(name = "MIT_ID", nullable = false)
private BigDecimal mitId;
@Column(name = "MULTI_INSTANCEABLE", nullable = false, length = 1)
private String multiInstanceable;
@Column(length = 1)
private String visible;
@ManyToOne
@JoinColumn(name = "MIT_ID_PARENT")
@XmlTransient private MenuItems menuItems;
@OneToMany(mappedBy = "menuItems")
@XmlTransient private List<MenuItems> menuItemsList;
@ManyToOne
@JoinColumn(name = "MTP_CODE")
private MenuItemTypes menuItemTypes;