私はこのGrails2.0.3プロジェクトを持っています。このプロジェクトでは、2つのモデルがDomainAあり、両方がの子である関係DomainBによって相互に関連付けられています。many-to-manyDomainBDomainA
class DomainA {
// properties
static hasMany = [domains: DomainB]
}
class DomainB {
// properties
static hasMany = [domains: DomainA]
static belongsTo = [DomainA]
}
この種の設計を前提として、に設定されたクエリに従うDomainBインスタンスが存在するすべての場所にクエリを実行したいと思います。DomainADomainA
def domainsList = DomainA.createCriteria().list() {
// other criterions for the other properties
}
DomainB.createCriteria().list() {
inList("domains", domainsList)
// other criterions for the other properties
}
上記のコードを実行すると、エラーが表示され、条件のプロパティ名が表示さERROR util.JDBCExceptionReporter - Parameter #1 has not been set.れます。Parameter #1domainsinList
この問題がありますが、これを解決することは可能ですか?どのように?