2つのドメインオブジェクトがあります
Class Attachment{
static hasMany = [mailDrafts: MailDraft];
}
Class MailDraft{
static hasMany = [attachments: Attachment]
static belongsTo = Attachment
}
3つのテーブルを作成しました
1)attachment
2)mail_draft
3)attachment_mail_drafts
attachment_mail_drafts: id, mail_draft_id
さて、HQLクエリを書きto delete an entry from the table 'attachment_mail_drafts' where 'attachment_id' is 4
たいのですが、クエリとは何ですか。