import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import javax.persistence.Table;
import javax.validation.Valid;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
@NamedQuery(
name = "FnMenuFunctionalRoles.retrieveByMenuId",
query = "from FnMenuFunctionalRoles where menuId.menuId =:menuId"
@NamedQuery(
name = "FnMenuFunctionalRoles.retrieveByMenuId",
query = "from FnMenuFunctionalRoles where menuId.menuId =:menuId"
@Column(name = "id", nullable = false, length = 11, columnDefinition = "int(11) AUTO_INCREMENT")
@Digits(integer = 11, fraction = 0)
private Long id;
@Column(name = "id", nullable = false, length = 11, columnDefinition = "int(11) AUTO_INCREMENT")
@Digits(integer = 11, fraction = 0)
private Long id;
@JoinColumn(name = "menu_id", nullable = false)
@Valid
@NotNull
private FnMenuFunctional menuId;
@JoinColumn(name = "menu_id", nullable = false)
@Valid
@NotNull
private FnMenuFunctional menuId;
- @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
- @JoinColumn(name = "role_id", nullable = false)
+ @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE)
+ @JoinColumn(name = "role_id", nullable = false, columnDefinition = "bigint")
- @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
- @JoinColumn(name = "app_Id", nullable = false)
+ @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE)
+ @JoinColumn(name = "app_Id", nullable = false, columnDefinition = "bigint")