--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/au1-gjNnxvwJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
To post to this group, send email to play-f...@googlegroups.com.
To unsubscribe from this group, send email to play-framewo...@googlegroups.com.
If this is any help, the code that chokes the second go around is this:obj.getClass().isAnnotationPresent(Searchable.class)
This code works find when the application is compile initially, but when it's incrementally compiled thereafter this snippet is the failure point. Searchable is one of the annotations that I created. Nothing special.
If this is any help, the code that chokes the second go around is this:obj.getClass().isAnnotationPresent(Searchable.class)
This code works find when the application is compile initially, but when it's incrementally compiled thereafter this snippet is the failure point. Searchable is one of the annotations that I created. Nothing special.
On Monday, 20 August 2012 10:36:24 UTC-4, Jay Q. wrote:
@Embeddable
public class DriverRegionId implements Serializable {
private static final long serialVersionUID = -6004669670091375590L;
@ManyToOne
private Driver driver;
@ManyToOne
private Region region;
public Driver getDriver() {
return driver;
}
public void setDriver(Driver driver) {
this.driver = driver;
}
public Region getRegion() {
return region;
}
public void setRegion(Region region) {
this.region = region;
}
//@Override
public int hashCode() {
int result;
result = (driver != null ? driver.hashCode() : 0);
result = 31 * result + (region != null ? region.hashCode() : 0);
return result;
}
//@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
DriverRegionId that = (DriverRegionId) o;
if (driver != null ? !driver.equals(that.driver) : that.driver != null)
return false;
if (region != null ? !region.equals(that.region) : that.region != null)
return false;
return true;
}
}
@Entity
@Table(name = "region_driver")
@AssociationOverrides({
@AssociationOverride(name = "pk.driver",
joinColumns = @JoinColumn(name = "driver_id")),
@AssociationOverride(name = "pk.region",
joinColumns = @JoinColumn(name = "region_id")) })
public class DriverRegion extends BaseModel {
private static final long serialVersionUID = 3233477537300849362L;
private DriverRegionId pk = new DriverRegionId();
@Column(name="is_active")
private boolean isActive;
@EmbeddedId
public DriverRegionId getPk() {
return pk;
}
public void setPk(DriverRegionId pk) {
this.pk = pk;
}
@Transient
@XmlTransient
public Driver getDriver() {
return getPk().getDriver();
}
public void setDriver(Driver driver) {
getPk().setDriver(driver);
}
@Transient
@XmlTransient
public Region getRegion() {
return getPk().getRegion();
}
public void setRegion(Region region) {
getPk().setRegion(region);
}
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
DriverRegion that = (DriverRegion) o;
if (getPk() != null ? !getPk().equals(that.getPk())
: that.getPk() != null)
return false;
return true;
}
public int hashCode() {
return (getPk() != null ? getPk().hashCode() : 0);
}
}
@Entity
@Table(name = "region")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Region.findAll", query = "SELECT r FROM Region r"),
@NamedQuery(name = "Region.findById", query = "SELECT r FROM Region r WHERE r.id = :id"),
@NamedQuery(name = "Region.findByName", query = "SELECT r FROM Region r WHERE r.name = :name")
})
public class Region extends BaseModel {
private static final long serialVersionUID = 1569807861428929099L;
public static Finder<Long, Region> find = new Finder<Long, Region>(Long.class, Region.class);
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id", nullable = false)
private Long id;
@Basic(optional = false)
@Column(name = "name", nullable = false, length = 255)
private String name;
//@OneToMany(cascade = CascadeType.ALL, mappedBy = "Region")
@OneToMany(mappedBy = "region")
private List<RrSite> rrSiteList;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pk.region")
private List<DriverRegion> driverRegions = new ArrayList<DriverRegion>();
public Region() {
}
public Region(Long id) {
this.id = id;
}
public Region(Long id, String name) {
this.id = id;
this.name = name;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Transient
@XmlTransient
public List<RrSite> getRrSiteList() {
return rrSiteList;
}
public void setRrSiteList(List<RrSite> rrSiteList) {
this.rrSiteList = rrSiteList;
}
@Transient
@XmlTransient
public List<DriverRegion> getDriverRegion() {
return driverRegions;
}
public void setDriverRegion(List<DriverRegion> driverRegions) {
this.driverRegions = driverRegions;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Region)) {
return false;
}
Region other = (Region) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
}
@Entity
@Table(name = "driver")
@XmlRootElement
//public class Driver extends Model {
public class Driver extends BaseModel {
private static final long serialVersionUID = -2378727866829160641L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", nullable = false)
private Long id;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pk.driver", cascade=CascadeType.ALL)
private List<DriverRegion> driverRegions = new ArrayList<DriverRegion>(0);
@Transient
@XmlTransient
public List<DriverRegion> getDriverRegion() {
return driverRegions;
}
public void setDriverRegion(List<DriverRegion> driverRegions) {
this.driverRegions = driverRegions;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof Driver)) {
return false;
}
Driver other = (Driver) object;
if ((this.id == null && other.id != null)
|| (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
}
@Entity
@Table(name = "region")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "Region.findAll", query = "SELECT r FROM Region r"),
@NamedQuery(name = "Region.findById", query = "SELECT r FROM Region r WHERE r.id = :id"),
@NamedQuery(name = "Region.findByName", query = "SELECT r FROM Region r WHERE r.name = :name")
})
public class Region extends BaseModel {
private static final long serialVersionUID = 1569807861428929099L;
public static Finder<Long, Region> find = new Finder<Long, Region>(Long.class, Region.class);
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id", nullable = false)
private Long id;
@Basic(optional = false)
@Column(name = "name", nullable = false, length = 255)
private String name;
//@OneToMany(cascade = CascadeType.ALL, mappedBy = "Region")
@OneToMany(mappedBy = "region")
private List<RrSite> rrSiteList;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "pk.region")
private List<DriverRegion> driverRegions = new ArrayList<DriverRegion>();
public Region() {
}
public Region(Long id) {
this.id = id;
}
public Region(Long id, String name) {
this.id = id;
this.name = name;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Transient
@XmlTransient
public List<RrSite> getRrSiteList() {
return rrSiteList;
}
public void setRrSiteList(List<RrSite> rrSiteList) {
this.rrSiteList = rrSiteList;
}
@Transient
@XmlTransient
public List<DriverRegion> getDriverRegion() {
return driverRegions;
}
public void setDriverRegion(List<DriverRegion> driverRegions) {
this.driverRegions = driverRegions;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Region)) {
return false;
}
Region other = (Region) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
public DriverRegionId() {
super();
}
public DriverRegionId(Driver driver, Region region) {
super();
this.driver = driver;
this.region = region;
resolvers += Resolver.file("Local Repository", file("/Users/adel/git/Play20/repository/local"))(Resolver.ivyStylePatterns)
addSbtPlugin("play" % "sbt-plugin" % "2.2-SNAPSHOT")
I still get the same error.....Unless I am not really pointing to my "locally-published" Play20 source built repo....