[forge-issues] [JBoss JIRA] (FORGE-2138) Being able to add a @NamedQuery to an existing entity
George Gastaldi (JIRA)
issues at jboss.org
Wed Nov 19 16:11:39 EST 2014
[ https://issues.jboss.org/browse/FORGE-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
George Gastaldi closed FORGE-2138.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.12.3.Final
(was: 2.x Future)
Resolution: Done
> Being able to add a @NamedQuery to an existing entity
> -----------------------------------------------------
>
> Key: FORGE-2138
> URL: https://issues.jboss.org/browse/FORGE-2138
> Project: Forge
> Issue Type: Sub-task
> Components: Java EE
> Affects Versions: 2.12.2.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 2.12.3.Final
>
>
> It would be useful to have a command to add a new JPA NamedQuery to an existing entity. A command such as :
> {code}
> jpa-new-named-query --named findAll --query select b from Book b
> {code}
> Would add to an existing entity the following code :
> {code}
> @Entity
> @NamedQueries({
> @NamedQuery(name = Book.FIND_ALL, query = "SELECT b FROM Book b")
> })
> public class Book implements Serializable
> {
> public static final String FIND_ALL = "Book.findAll";
> ...
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
More information about the forge-issues
mailing list