Is it possible to define finderquestion that returns a CMR field?
What I woul like to do is the following. I have a CMP bean that I know the id of, object A. That object has a CMR field to the CMP I whant to return, object B.
I would like to specify a finder method in the CMP A that looks like this.
SELECT DISTINCT OBJECT(a.objectB) FROM ObjectA AS a WHERE a.id= ?1
Today I am retreiving object A throught the findByPrimaryKey method and then returning the objectB object using a.getObjectB(). But if it is more efficent to get the object B throw an EJB-QL I would preffer that.