mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#502 - jsonContext.toJson(o, generator, path) can not apply path on @Transient field that is an entity bean
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package com.avaje.tests.json.transientproperties;
|
||||
|
||||
import com.avaje.ebean.annotation.Sql;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Transient;
|
||||
import java.util.List;
|
||||
|
||||
@Sql
|
||||
@Entity
|
||||
public class ModelA {
|
||||
|
||||
@Id
|
||||
int id;
|
||||
|
||||
String a;
|
||||
|
||||
// transient mapping to an entity bean
|
||||
@Transient
|
||||
List<ModelB> list;
|
||||
|
||||
public String getA() {
|
||||
return a;
|
||||
}
|
||||
|
||||
public void setA(String a) {
|
||||
this.a = a;
|
||||
}
|
||||
|
||||
public List<ModelB> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<ModelB> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user