Example usage for javax.persistence CascadeType MERGE

List of usage examples for javax.persistence CascadeType MERGE

Introduction

In this page you can find the example usage for javax.persistence CascadeType MERGE.

Prototype

CascadeType MERGE

To view the source code for javax.persistence CascadeType MERGE.

Click Source Link

Document

Cascade merge operation

Usage

From source file:example.Right.java

@OneToOne(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, targetEntity = Left.class, fetch = FetchType.LAZY)
public Left getOne2one() {
    return one2one;
}

From source file:example.Left.java

@OneToOne(optional = false, cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, targetEntity = Right.class, mappedBy = "one2one", fetch = FetchType.LAZY)
public Right getOne2one() {
    return one2one;
}

From source file:example.Right.java

@ManyToOne(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, targetEntity = Left.class, fetch = FetchType.LAZY)
public Left getMany2one() {
    return many2one;
}

From source file:example.Left.java

@OneToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, targetEntity = Right.class, mappedBy = "many2one")
public Set<Right> getOne2many() {
    return one2many;
}

From source file:com.springside.lanzhm.hellospring.entity.User.java

@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER)
@JoinTable(name = "sys_user_role", joinColumns = { @JoinColumn(name = "user_id") }, inverseJoinColumns = {
        @JoinColumn(name = "role_id") })
public Set<Role> getRoles() {
    return roles;
}

From source file:com.solace.data.caching.Person.java

@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, mappedBy = "children", targetEntity = Parent.class)
public List<Parent> getParents() {
    return this.parents;
}

From source file:example.Child.java

@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, mappedBy = "children", targetEntity = Parent.class)
// Contrived check for regression example. Should clean this up. No updating child 4 via parent 10
@UpdatePermission(all = Child4Parent10Check.class)
public Set<Parent> getParents() {
    return parents;
}

From source file:com.eryansky.entity.base.Role.java

@ManyToMany(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY)
@JoinTable(name = "T_BASE_ROLE_RESOURCE", joinColumns = {
        @JoinColumn(name = "ROLE_ID") }, inverseJoinColumns = { @JoinColumn(name = "RESOURCE_ID") })
//    @Fetch(FetchMode.SUBSELECT)
@OrderBy("id")/*w w  w.  j  a v  a2 s . c  o  m*/
//    @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE,region = CacheConstants.HIBERNATE_CACHE_BASE)
public List<Resource> getResources() {
    return resources;
}

From source file:mx.ecosur.multigame.gente.entity.GentePlayer.java

@OneToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.EAGER)
public GentePlayer getPartner() {
    return partner;
}

From source file:com.eryansky.entity.sys.DictionaryType.java

@ManyToOne(cascade = { CascadeType.PERSIST, CascadeType.MERGE })
@JoinColumn(name = "GROUP_CODE", referencedColumnName = "CODE")
public DictionaryType getGroupDictionaryType() {
    return groupDictionaryType;
}