hello
Simplified situation is following:
I have User, Project and Company entities. User has Projects.
Both User and Project has relation to Company.
I have select like this:
```
select ....
from user u
left join project p on
u.id = p.user_id
inner join company c on u.company_id =
c.id```
In my situation project and user belongs to the same company.
And on the entity level I want to have relation to the same Company
java object.
But mybatis creates separate Company objects fro each project.
I used result map like this:
```
<resultMap id="companyResultMap" type="Company">
<result property="name" column="name"/>
</resultMap>
<resultMap id="projectResultMap" type="Project">
<result property="name" column="project_name"/>
<association property="company" resultMap="companyResultMap" />
</resultMap>
<resultMap id="userResultMap" type="User">
<association property="company" resultMap="companyResultMap" columnPrefix="c_"/>
<collection property="projects" resultMap="projectResultMap" columnPrefix="p_"/>
</resultMap>
```
I wonder is there any way to share object within the session, take it from existing
result set instead of using separate select?