mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Add Wobu TestCacheDelete test case for cached beans
This commit is contained in:
@@ -3,9 +3,11 @@ package com.avaje.tests.model.basic;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToMany;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.avaje.ebean.annotation.CacheStrategy;
|
||||
@@ -22,10 +24,13 @@ public class OCachedBean {
|
||||
Long id;
|
||||
|
||||
String name;
|
||||
|
||||
|
||||
@ManyToMany
|
||||
List<Country> countries = new ArrayList<Country>();
|
||||
|
||||
@OneToMany(mappedBy = "cachedBean", cascade = CascadeType.ALL)
|
||||
List<OCachedBeanChild> children = new ArrayList<OCachedBeanChild>();
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -49,4 +54,12 @@ public class OCachedBean {
|
||||
public void setCountries(List<Country> countries) {
|
||||
this.countries = countries;
|
||||
}
|
||||
|
||||
public List<OCachedBeanChild> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<OCachedBeanChild> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user