Add support for @EmbeddedId annotations

karkum: get rid of this change. It's not needed anymore (it can be a static method).