Community
Participate
Working Groups
We currently support partial packages in the package element in orm.xml. I have not yet discovered where we came up with this requirement, but I do know that neither EclipseLink nor Hibernate JPA implementations support this. <package>com.foo</package> <entity class="model.Employee"</entity> We first looks for a class named model.Employee and if we don't find it we look for the class com.foo.model.Employee. The runtime implementations will only work if the class model.Employee exists. Basically, they check if the entity class is qualified (contains a '.') and use that as the fully qualified name. If the entity class is not qualified, then they prepend "com.foo" to the class name. 1. This use case will work for generic JPA implementations <package>com.foo.model</package> <entity class="Employee"</entity> <entity class="com.foo.model.Address"</entity> 2. EclipseLink supports this use case as well, notice the '.' at the end of the package name. Hibernate does not support this use case. I have not tested any other JPA implementations so will assume this was not the intent of the JPA spec. <package>com.foo.model.</package> <entity class="Employee"</entity> <entity class="com.foo.model.Address"</entity>
fixed in 3.2M6
The provisional API additions listed https://bugs.eclipse.org/bugs/show_bug.cgi?id=277017#c4 were made for this bug as well. Also, OrmPersistentType.mappingClassChanged(String, String) provisional API was removed.
Verified in Build I-3.4.0-20120223091229 Verified when you split the package name in the orm or eclipselink orm mapping files that you receive an error message. Also verified the other use cases below work per comment 1. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.2_M6