[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: Unknown entity type - addl details

Did you try listing your entity classes in persistence xml?

To do that you need to add a "class" child to your persistnce xml before
the <properties> child like this.

<persistence-unit name="some_pu" transaction-type="RESOURCE_LOCAL">
		<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>

		<class>org.package.[...].DiscountCode</class>
		<class>org.package.SomeOtherClass</class>
		<properties>
			<property name="eclipselink.jdbc.driver" 				
value="oracle.jdbc.driver.OracleDriver" />
		[...]

I remember that when I switched to EL from Hibernate that I had to list
my classes as EL whas complaining about not knowing my entites. That
helped. EL seems to be more strict concerning unlisted entites as other
ORM's.

Later,

Tom

Serge schrieb:
>  - javax.persisten.jar is for jpa 2.0
> 
>  - if I replace eclipselink with either toplink or hibernate(not sure
> with version) all works. i.e. add toplink/hibernate libraries and
> replace provider/properties in persistence.xml.