Java Code Examples for org.hibernate.annotations.LazyCollectionOption#EXTRA
The following examples show how to use
org.hibernate.annotations.LazyCollectionOption#EXTRA .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: User.java From aws-photosharing-example with Apache License 2.0 | 5 votes |
@XmlTransient @LazyCollection(LazyCollectionOption.EXTRA) @ManyToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL) @JoinTable(name = "role_mappings", joinColumns = { @JoinColumn(name = "user_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "role", nullable = false, updatable = false) }) public List<Role> getRoles() {return _roles;}
Example 2
Source File: Album.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@OneToMany(mappedBy = "album") @LazyCollection(LazyCollectionOption.EXTRA) public List<Comment> getComments() {return comment;}
Example 3
Source File: Album.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@OneToMany(mappedBy = "album", orphanRemoval=true) @LazyCollection(LazyCollectionOption.EXTRA) public List<Share> getShares() {return shares;}
Example 4
Source File: Album.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@XmlTransient @LazyCollection(LazyCollectionOption.EXTRA) @ManyToMany(fetch = FetchType.LAZY, mappedBy = "albums", cascade=CascadeType.PERSIST) public List<Media> getMedia() {return media;}
Example 5
Source File: User.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@XmlTransient @LazyCollection(LazyCollectionOption.EXTRA) @OneToMany(mappedBy = "user", orphanRemoval=true, fetch=FetchType.LAZY, cascade=CascadeType.ALL) public List<Media> getMedia() {return media;}
Example 6
Source File: User.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@XmlTransient @LazyCollection(LazyCollectionOption.EXTRA) @OneToMany(mappedBy = "user", orphanRemoval=true, fetch=FetchType.LAZY, cascade=CascadeType.ALL) public List<Share> getShares() {return shares;}
Example 7
Source File: User.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@XmlTransient @LazyCollection(LazyCollectionOption.EXTRA) @OneToMany(mappedBy = "user", orphanRemoval=true, fetch=FetchType.LAZY, cascade=CascadeType.ALL) public List<Album> getAlbums() {return albums;}
Example 8
Source File: Role.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@XmlTransient @LazyCollection(LazyCollectionOption.EXTRA) @ManyToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="roles") public Set<User> getUsers() {return this._users;}
Example 9
Source File: Media.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@OneToMany(mappedBy = "media") @LazyCollection(LazyCollectionOption.EXTRA) public List<Comment> getComments() {return comment;}
Example 10
Source File: Media.java From aws-photosharing-example with Apache License 2.0 | 4 votes |
@OneToMany(mappedBy = "media", orphanRemoval=true) @LazyCollection(LazyCollectionOption.EXTRA) public List<Share> getShares() {return shares;}