ok, first QueryCustomizer implementation is working :-) Thanks!
Now I got the next question. How should I pass values on the fly to my customizer.
I would like to restrict the collection to one value and at my test case I already have the
primary key of the row. But how can I pass this value to my customizer?
I saw that I could add attributes at the deployment descriptor but the value of the
primary key changes dynamically during my application.
My sample:
public Query customizeQuery(Object anObject, PersistenceBroker aBroker, CollectionDescriptor aCod, QueryByCriteria aQuery)
{
aQuery.getCriteria().addEqualTo("field","value");
return aQuery;
}
The "value" should change dynamically. Could somebody give me a aditional hint?
best regards,
Guido
Jakob Braeuchi wrote:
hi guido,
please have a look at the query customizer.
jakob
Guido Beutler wrote:
Hello,
I've got a 1:N mapping between classes. I would like to restrict the entries at the retrieved collection.
I got two Classes A and B with a 1:n mapping between it. B has >17000 entries so I would like
to restrict the collection to a small set of B's by using the primary key of B.
By using a path expression I get the correct A but the collection from A to B contains all values of B
not only the ones with the given b.pk .
Could somebody give me a hint where to look at?
Thanks in advance, best regards,
Guido
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
