[hibernate-dev] how to get an EntityBinding by class name?

Strong Liu stliu at hibernate.org
Fri Jul 6 05:28:27 EDT 2012


Hi,

having a question as $subject.

the return element (org.hibernate.internal.jaxb.mapping.hbm.JaxbReturnElement) has both entity name and class name attributes, and we are supposed to use one of them to get the target EntityBinding.

though look up entitybinding by entityname is easy, but I'm not sure how to look up entitybinding by class name, for now, i have used a stupid way, iterator the whole entitybindings within Metadata

org.hibernate.metamodel.internal.source.annotations.global.SqlResultSetProcessor#bindEntityResult

wondering if there is a better way to deal with this.
-------------------------
Best Regards,

Strong Liu <stliu at hibernate.org>
http://about.me/stliu/bio



More information about the hibernate-dev mailing list