NamedQuery in Entity design

Hi
I am wondering if I post this as a question or as an idea for enhancement.

How can we dynamically create NamedQueries while creating an Entity in entity designer.
something like this:


@NamedQueries({
@NamedQuery(name="Item.findAllItemRecords" , 
                      query="SELECT item " +
                                "FROM Item item "
                                "WHERE item.itemId=:itemId),
@NamedQuery(name="Item.findItemByType" , 
                      query="SELECT item " +
                                "FROM Item item "
                                "WHERE item.itemType=:itemType)
})
@Entity
public class Item {

   @Id
   @Column(name="item_id")
   private String itemId;

   @Column(name="item_type")
   private String itemType;

   //.......
 }

Hi Mortoza,

We will consider your idea, and if we see that this functionality is useful for wide community we will include this feature in the future.

Regards.

Thank you. Netbeans has this functionality when you create Entity from a database table. It should not be a lengthy work, i think a free marker program may be the solutions, but i’m not the expert!