I am sorry this has taken so long, but i now have time to come back to this
(project panic finished)
creating a main and selelcting from TestBean (no enhancement) i get:
16-Nov-2010 15:42:03 com.test.dao.EntityManagerHelper log
INFO: finding allTest
110 TestPU INFO [main] openjpa.Runtime - Starting OpenJPA 1.2.2
250 TestPU INFO [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
781 TestPU INFO [main] openjpa.Enhance - Creating subclass for "[class
com.test.dao.Cocktail, class com.test.dao.TestBean]". This means that your
application will be less efficient and will consume more memory than it
would if you ran the OpenJPA enhancer. Additionally, lazy loading will not
be available for one-to-one and many-to-one persistent attributes in types
using field access; they will be loaded eagerly instead.
1594 TestPU TRACE [main] openjpa.jdbc.SQL - <t 31212095, conn 25254907>
executing prepstmnt 21465667 SELECT t0.id, t0.name, t0.activeYN FROM
cocktails t0 ORDER BY t0.id ASC
1610 TestPU TRACE [main] openjpa.jdbc.SQL - <t 31212095, conn 25254907>
[16 ms] spent
I worked out how to do what you asked (ok it qwas quite simple when i wasn't
panicing) and this is the result from the console
16-Nov-2010 15:44:11 com.test.dao.EntityManagerHelper log
INFO: finding allTest
141 TestPU INFO [main] openjpa.Runtime - Starting OpenJPA 1.2.2
235 TestPU INFO [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
1829 TestPU TRACE [main] openjpa.jdbc.SQL - <t 3841429, conn 4176892>
executing prepstmnt 30702379 SELECT t0.id, t0.name, t0.activeYN FROM
cocktails t0 ORDER BY t0.id ASC
1860 TestPU TRACE [main] openjpa.jdbc.SQL - <t 3841429, conn 4176892> [31
ms] spent
And using the eclipse bytecode enhancer plugin:
16-Nov-2010 15:45:32 com.test.dao.EntityManagerHelper log
INFO: finding allTest
109 TestPU INFO [main] openjpa.Runtime - Starting OpenJPA 1.2.2
250 TestPU INFO [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
16-Nov-2010 15:45:33 com.test.dao.EntityManagerHelper log
SEVERE: find all failed name failed
<openjpa-1.2.2-r422266:898935 nonfatal user error>
org.apache.openjpa.persistence.ArgumentException: An error occurred while
parsing the query filter "select model from testTable model order by
model.id". Error message: The name "testTable" is not a recognized entity or
identifier. Perhaps you meant TestBean, which is a close match. Known entity
names: [TestBean, Cocktail]
at
org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:118)
--
View this message in context:
http://openjpa.208410.n2.nabble.com/beans-Enitiy-annotation-and-bytcode-enhancement-tp5380244p5744274.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.