1
刪除用戶我收到的時候我試圖在GORM刪除受訪者這樣的錯誤:不能在格姆
Referential integrity constraint violation: "FK_APCC8LXK2XNUG8377FATVBN04:
PUBLIC.USER_ROLE FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USERS(ID) (40)";
SQL statement: delete from users where id=? and version=? [23503-176]
這是我的域名:
package com.cgi.recruitmenttest
import com.cgi.security.User
class Interviewee extends User{
String firstName
String lastName
String email
String telephone
String level
static hasMany = [results:Result,tests:TestInterviewe]
static constraints = {
lastName()
firstName()
email(email: true)
telephone(nullable: true)
level inList: ['Debutant', 'Confirme', 'Expert']
}
}
我只是試圖創建一個沒有結果和測試的受訪者,但是當我刪除時,我得到這個錯誤..
有人可以幫忙嗎?謝謝
你要怎麼刪除? – injecteer
我使用腳手架默認方法刪除 – Ewyldor