mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-11 01:38:07 +00:00
#1743 - When using @PrimaryKeyJoinColumn, FK constraint generation cannot be disabled
This commit is contained in:
1 parent
d49a7c415f
commit
9f19ed5376
5 files changed
+34
-17
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package org.tests.model.onetoone;
|
||||
|
||||
import io.ebean.annotation.DbForeignKey;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.OneToOne;
|
||||
@@ -21,6 +23,7 @@ public class OtoUPrime {
|
||||
*/
|
||||
@OneToOne
|
||||
@PrimaryKeyJoinColumn
|
||||
@DbForeignKey(noConstraint = true)
|
||||
OtoUPrimeExtra extra;
|
||||
|
||||
@Version
|
||||
@@ -32,7 +35,7 @@ public class OtoUPrime {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "id:"+ pid +" name:"+name+" extra:"+extra;
|
||||
return "id:" + pid + " name:" + name + " extra:" + extra;
|
||||
}
|
||||
|
||||
public UUID getPid() {
|
||||
|
||||
Reference in new issue
Block a user