java - Grails belongsTo, should I? -
We go directly to problems (with Grails 1.1.1, this should work on the previous one)
< P> I have 2 domain meanings: Users and extensions like this: Class User {String userName; ..... // Another area is stable haymany = [description: detail]; } Class extension {string description name; ... // Another field is static = [user: user]; }
Now if I did this:
Diff user = User .get (1); Detail.findAllByUser (user);
Why does this error generate?
But if I am amending the detail
class details {string description name; ... // other field user user; Stable relative = [user: user]; }
(By adding the user) it will work as normal ...
Is there any effect to insert? Or did I use the concept of mistakes here?
Your example is not how you would normally get the details. Examples will be accessed through a user instance, for example:
def = user. Gate (1) DIF userdifferences = User Dentistry / No details. FIDALUUSER (user);
Comments
Post a Comment