Quantcast

Compound/Composite key with <id/>

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Compound/Composite key with <id/>

Filipe Sousa
Hello,

I'm using a database that uses compound keys in almost all tables. The documentation states that "id elements play a very important role in Nested Result mapping". Can I use more than one <id/> in a resultMap?. Something like
<resultMap type="...." id="...">
<id property="p1" column="c1"/>
  <id property="p2" column="c2"/>
</resultMap>

Thanks.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Compound/Composite key with <id/>

Eduardo Macarron
Yes Felipe, that can be done.

El día 17 de abril de 2012 16:31, Filipe Sousa <[hidden email]> escribió:

> Hello,
>
> I'm using a database that uses compound keys in almost all tables. The
> documentation states that "id elements play a very important role in Nested
> Result mapping". Can I use more than one <id/> in a resultMap?. Something
> like
> <resultMap type="...." id="...">
> <id property="p1" column="c1"/>
>   <id property="p2" column="c2"/>
> </resultMap>
>
> Thanks.
>
Loading...