To clarify, is the issue that you want to effectively have a Party class with derived types (Builder and Broker), but the discriminator that defines which subclass of Party the given instance is does not exist in the same table as the Party objects themselves?
If the party type existed in the Party table I know you could construct your relationships (many to many, since you're using a join-table) easily enough and create the appropriate queries but I'm not certain whether or not you can actually have your discriminator in another table.
An example query might be:
Code:
FROM Party p INNER JOIN p.Applications a WHERE a.Id = ? AND p.class = ?
This would return all Party objects that have an application with the specified id and are of the specified class.
I know this isn't really answering your question, but I wasn't entirely clear as to what you're after from your post. :(
Symon.