I\'m working with OpenJPA but my application use only raw-sql style (legacy and performance reasons, yeah) We have a table, say ZIP which had composite primary key - (ZIP_ID