Hello,
I have a table with structure and value like below, with no primary key
table name: service
phone_model (varchar)    service (varchar)
--------------------------------------------------------
E71                                    MMS
E71                                    GPRS
the table is annotated in a class like this:
Code:
@Entity
@Table(name="service")
public class Service implements Serializable {
   private String phone_model;
   private String service;
  @Id
  public String getPhone_model() {
  ....
  
}
then, I tried to do: List list = session.createQuery("from Service").list();
the result size is 2, but the content is:
E71                                   MMS
E71                                   MMS
I tried to use createSQLQuery("select * from service"); also, but the results are the same.
does anyone know why this happen?
thanks,
Faizal