[jboss-user] [EJB3] - Re: Weired JPA named query @NamedQuery behaviour
Christian Groove
do-not-reply at jboss.com
Mon Jan 24 15:21:02 EST 2011
Christian Groove [http://community.jboss.org/people/TheGroove] created the discussion
"Re: Weired JPA named query @NamedQuery behaviour"
To view the discussion, visit: http://community.jboss.org/message/582863#582863
--------------------------------------------------------------
Salut Ilja,
> A named query is a statically defined query with a predefined unchangeable query string.
i agree to this, bit Dbean1.JPQL_COMPOSITION is definitivly static and
unachnageable. For that reason i use final-static modifier. But
Jboss still think, it is not.
but:
@NamedQueries(
{
@NamedQuery(
name=Dbean1.GET_COMPOSITION,
query=Dbean1.JPQL_COMPOSITION)
}
)
where:
@Entity
public class Dbean1. implements Serializable
{
/* some code */
final public static String GET_COMPOSITION = ".... composition " ;
final public static String JPQL_COMPOSITION = "SELECT dbean FROM ..... " + Dbean1.dummyClass() ;
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/582863#582863]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110124/2a849e27/attachment.html
More information about the jboss-user
mailing list