users@glassfish.java.net

Re: JPA 2 Dynamic Metamodel Question

From: <glassfish_at_javadesktop.org>
Date: Wed, 17 Mar 2010 09:52:40 PDT

Hi Noah. You've hit one of the current limitations in developing Criteria queries using dynamic Metamodel classes.

The compiler doesn't know about the dynamic Metamodel attributes until the clases have actually been generated, so you get syntax errors and missing symbols.

Generating the static Metamodel classes and adding them to the compile-time classpath, but not packaging them with the WAR should work.

We hope that in the near-future tool support for the Metamodel API will automatically take care of this for you, but until IDEs catch up, you're unfortunately stuck having to generate the static Metamodel classes.
[Message sent by forum member 'ievans']

http://forums.java.net/jive/thread.jspa?messageID=392392