Questions tagged [dynamic-finders]
49 questions
0
votes
1 answer
Grails findBy belongsTo gives JdbcSQLException
Say, for a system, I had Student and User objects, like so:
User {
}
Student {
User user //not nullable
static belongsTo = [User]
}
Teacher {
static belongsTo = [user:User]
}
I have a lot of code written against these models, and…
user1589069
0
votes
2 answers
Can I scope dynamic attribute-based finders to an object?
Don't mind me, I fricked up my attribute names :(
This is entirely possible, using the exact syntax I used - you just need to be able to spell!
I can't seem to get this to work, and it seems like a common enough scenario that there must be a…

nfm
- 19,689
- 15
- 60
- 90
0
votes
1 answer
Add named_scopes dynamically in rails application
Just like dynamic finder methods in rails, is there any way to have dynamic finder methods for associated models?
Consider the following models
class User
attr_accessible :name, :phone_no
has_many :notes
end
class Note
belongs_to :user
…

Kashif Umair Liaqat
- 107
- 1
- 1
- 11
-1
votes
1 answer
The findBy dynamic finder is returning null records in a portlet
The findBy dynamic finder is returning null records in a portlet.
Have anyone got dynamic finders to work inside a portlet?
In the console I have:
def results = stp.Spriden.findByPidm(72464)
println results.firstname
Exception…

Scott D. Umphrey
- 1
- 3