mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
* FIX testcases for MariaDB+utf8mb4 (Failure was: "Specified key was too long; max key length is 767 bytes") * Excluded tests that won't work on SqlServers generated ids
50 lines
890 B
Java
50 lines
890 B
Java
package org.tests.model.onetoone;
|
|
|
|
import javax.persistence.CascadeType;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.OneToOne;
|
|
import javax.validation.constraints.Size;
|
|
|
|
@Entity
|
|
public class OtoAtwo {
|
|
|
|
@Id
|
|
@Size(max = 100)
|
|
private String id;
|
|
|
|
private String description;
|
|
|
|
@OneToOne(orphanRemoval=true, cascade = CascadeType.ALL)
|
|
private OtoAone aone;
|
|
|
|
public OtoAtwo(String id, String description){
|
|
this.id = id;
|
|
this.description = description;
|
|
}
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getDescription() {
|
|
return description;
|
|
}
|
|
|
|
public void setDescription(String description) {
|
|
this.description = description;
|
|
}
|
|
|
|
public OtoAone getAone() {
|
|
return aone;
|
|
}
|
|
|
|
public void setAone(OtoAone aone) {
|
|
this.aone = aone;
|
|
}
|
|
}
|