troubleshooting Question

TopLink expressions query that uses instanceof

Avatar of Stucco
Stucco asked on
JavaJava EE
3 Comments1 Solution375 ViewsLast Modified:
I am writing a "where" expression clause for a toplink query.  The descriptors and object structure is such that my original object contains an attribute "entity" that is a reference to another abstract class object.  The object "login" extends and fully completes "entity".  The restrictions I need to put in my where clause include those limited to "login", and not accessible in "entity".

How can I say in the query that I want to make sure I am selecting an instance of login and not just all instances of entity?

builder.get("entity").get("username") does not work because only the login subclass has username.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros