5.1.21. import

5.1.21. import

Suppose your application has two persistent classes with the same name, and you don't want to specify the fully qualified (package) name in Hibernate queries. Classes may be "imported" explicitly, rather than relying upon auto-import="true". You may even import classes and interfaces that are not explicitly mapped.

<import class="java.lang.Object" rename="Universe"/>
<import
        class="ClassName"
        rename="ShortName"
/>

class: The fully qualified class name of of any Java class.

rename (optional - defaults to the unqualified class name): A name that may be used in the query language.