mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#442 - @JsonIgnore / @Expose ... not working on @OneToMany or @ManyToMany - was - @Transient field on @MappedSuperclass is not ignored by toJson()
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.avaje.tests.model.info;
|
||||
|
||||
import com.avaje.ebean.Model;
|
||||
import com.avaje.ebean.annotation.JsonIgnore;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
@@ -19,6 +20,7 @@ public class InfoCompany extends Model {
|
||||
|
||||
String name;
|
||||
|
||||
@JsonIgnore
|
||||
@OneToMany(mappedBy = "company", cascade = CascadeType.ALL)
|
||||
List<InfoContact> contacts = new ArrayList<InfoContact>();
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@ package com.avaje.tests.model.info;
|
||||
|
||||
import com.avaje.ebean.Model;
|
||||
|
||||
import javax.persistence.*;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Version;
|
||||
|
||||
@Entity
|
||||
public class InfoCustomer extends Model {
|
||||
|
||||
Reference in New Issue
Block a user