のようなドメインクラスを作成したいのですが、1 人のユーザーが多くの注文を投稿でき [双方向]、1 つの注文が多くのユーザーに気に入られる [一方向] です。
以下に示すようにドメインクラスを作成しました。
Class User {
String userName;
List orders
static hasMany = [Order]
}
Class Order {
String orderId
String orderName
//Indicates this order belongs to only one user
static belongsTo =[owner : User ] // Bidirectional
//Indicates order can be liked by many users
static hasMany = [likedUser : User] //Unidirectional
}
しかし、無効なスキーマというエラーが表示されます。どんな体でも助けてください...
この投稿は私の質問に似ていますが、取得できません。助けてください。