How Import work in Hibernate by R4R Team

How Import work in Hibernate:In the hibernate application if application has two persistent classes with the same name, and then do not want to specify the fully qualified package name in Hibernate queries. Whenever classes can be "imported" explicitly, rather than relying upon auto-import="true". So for this also import classes and interfaces that are not explicitly mapped:


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

<import class="ClassName"rename="ShortName" />


Below is the decription of the given above code:


1 class: It is the fully qualified class name of any Java class.

2 rename (optional - defaults to the unqualified class name): This is a name that can be used in the query language

Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!