Yup, that's what you need. I have an 'attachment' table which stores
images, or word docs, or whatever. I use conditions to represent that
attachment table based on the attachment type:
<manytomany name="picture" table="xAuctionAttachments" lazy="true"
proxied="true">
<link to="auction" column="auctionID" />
<link to="attachment" column="attachmentID" />
<collection type="array">
<condition property="type" value="image" />
</collection>
</manytomany>
<manytomany name="badge" table="xAuctionAttachments" lazy="true">
<link to="auction" column="auctionID" />
<link to="attachment" column="attachmentID" />
<collection type="array">
<condition property="type" value="badge" />
</collection>
</manytomany>
<manytomany name="thumbnail" table="xAuctionAttachments" lazy="true">
<link to="auction" column="auctionID" />
<link to="attachment" column="attachmentID" />
<collection type="array">
<condition property="type" value="thumb" />
</collection>
</manytomany>
Hth,
Chris Peterson