There is a logical difficulty I'm having with using the idiom
"values.value" where values is a list and value is one of the fields in
the elements contained
in the values list. I want to be able to find an item which has two
different values for "values.value" simultaneously. However when I
"&&" them together
they are exclusive in OJB and so I can't satisfiy both simultaneously.
I want to be able to specify somehow that they are two different
values. If I could use something like "values.get(n).value" or some
other function in my code, it would help. I don't want to do an "||" as
it would give me more matches than I want.
Thanks,
Dave
Armin Waibel wrote:
Hi David,
could it be the case that the type of 'values' is 'ArrayList' instead
of 'List'. OJB internally use specific collection/list implementation
classes.
http://db.apache.org/ojb/docu/guides/advanced-technique.html#Manageable+Collection
regards,
Armin
David Forslund wrote:
Thomas Dudziak wrote:
I can't tell why I can't access the values in PTrait_. What I'm doing
seems consistent with one of the examples in QueryTest except for the
inheritance aspect. Any suggestions?
The IllegalAccess error suggests that you're running in an environment
with a SecurityManager enabled that prevents your code from accessing
private fields, eg. an application server. You can either grant your
application that right (see the security manager documentation).
Or you can direct OJB to make the field accessible first before using
it by changing the used PersistentField implementation in
OJB.properties to PersistentFieldPrivilegedImpl.
Or - if the field in question has accessors - use bean access instead
by changing it to PersistentFieldIntrospectorImpl or to
PersistentFieldAutoProxyImpl (which uses bean access or direct
(privileged) access depending on what's available).
Tom
I'm not running in an Application Server. I'm running from the JVM
directly from the command line. I changed to
PersistentFieldPrivilegedImplNew and it still fails in the
PersistentFieldDirectAccess class the same way.
So I'm still puzzled.
Dave
---------------------------------------------------------------------
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]