3 Replies Latest reply on Oct 21, 2010 2:41 PM by henk de boer

    NamedNativeQuery (Pure native scalar queries are not yet sup

    Sascha Hoffmann Newbie

      Hi

      I have a little problem again. I try to use a EntityBean with a "NamedNativeQuery" but if i put it in the deploy-File of JBoss an Error pop up.

      08:38:00,796 WARN [ServiceController] Problem starting service persistence.units:jar=LoginBean.jar,unitName=tcdb
      org.hibernate.cfg.NotYetImplementedException: Pure native scalar queries are not yet supported
       at org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(QueryBinder.java:120)
      ........
      


      My EntityBean looks like this
      package tcejb;
      
      import javax.persistence.*;
      
      @Entity
      @NamedNativeQuery
      (
       name= "LOV_Rights.findRights",
       query= "select LOV_RT_RIGHT_CLASS, LOV_RT_RIGHT_READ, LOV_RT_RIGHT_CONFIRM, " +
       "LOV_RT_RIGHT_UPDATE, LOV_RT_RIGHT_NEW, LOV_RT_RIGHT_EXCL_REASON " +
       "from LOV_USER,LOV_USER_RIGHT,LOV_RIGHT_TYP " +
       "where LOV_USER.LOV_USR_USER = LOV_USER_RIGHT.LOV_URT_USER " +
       "and LOV_USER_RIGHT.LOV_URT_RIGHT_RULE_SIGN = LOV_RIGHT_TYP.LOV_RT_RIGHT_RULE_SIGN " +
       "and LOV_USER.LOV_USR_STATUS_SIGN = 'A' " +
       "and LOV_USER_RIGHT.LOV_URT_STATUS_SIGN = 'A' " +
       "and LOV_USER.LOV_USR_USER = :name"
      )
      @Table(name="LOV_USER")
      @SecondaryTables({
       @SecondaryTable(name="LOV_USER_RIGHT"),
       @SecondaryTable(name="LOV_RIGHT_TYP")
      })
      public class LOV_Rights implements java.io.Serializable {
      
       private static final long serialVersionUID = 1;
      
       private int lov_rt_right_class;
       private String lov_rt_right_read;
       private String lov_rt_right_confirm;
       private String lov_rt_right_update;
       private String lov_rt_right_new;
       private String lov_rt_right_excel_reason;
      
       @Column(name="LOV_RIGHT_CLASS", table="LOV_RIGHT_TYP")
       public int getlov_rt_right_class() {return lov_rt_right_class;}
       public void setlov_rt_right_class(int right_class) {this.lov_rt_right_class = right_class;}
      
       @Column(name="LOV_RT_RIGHT_READ", table="LOV_RIGHT_TYP")
       public String getlov_rt_right_read() {return lov_rt_right_read;}
       public void setlov_rt_right_read(String right_read) {this.lov_rt_right_read = right_read;}
      
       @Column(name="LOV_RT_RIGHT_CONFIRM", table="LOV_RIGHT_TYP")
       public String getlov_rt_right_confirm() {return lov_rt_right_confirm;}
       public void setlov_rt_right_confirm(String right_confirm) {this.lov_rt_right_confirm = right_confirm;}
      
       @Column(name="LOV_RT_RIGHT_UPDATE", table = "LOV_RIGHT_TYP")
       public String getlov_rt_right_update() {return lov_rt_right_update;}
       public void setlov_rt_right_update(String right_update) {this.lov_rt_right_update = right_update;}
      
       @Column(name="LOV_RT_RIGHT_NEW", table="LOV_RIGHT_TYP")
       public String getlov_rt_right_new() {return lov_rt_right_new;}
       public void setlov_rt_right_new(String right_new) {this.lov_rt_right_new = right_new;}
      
       @Column(name="LOV_RT_RIGHT_EXCEL_REASON", table="LOV_RIGHT_TYP")
       public String getlov_rt_right_excel_reason() {return lov_rt_right_excel_reason;}
       public void setlov_rt_right_excel_reason(String right_excel_reason) {this.lov_rt_right_excel_reason = right_excel_reason;}
      
      
      }
      


      What should i do that the Query will be suportet?