<table name> is not mapped

From: shahab <smahtab(at)pershing(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: <table name> is not mapped
Date: 2007-02-05 16:37:48
Message-ID: 8809786.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc


Hi:

I am trying to use access table in postgress database using hibernate.
(similar to tutirial at
http://cwiki.apache.org/S2WIKI/struts-2-spring-jpa-ajax.html) I am getting
the following error -

SEVERE: Could not execute action
java.lang.IllegalArgumentException:
org.hibernate.hql.ast.QuerySyntaxException: tmsuser is not mapped [select
t.id, t.us
erid, t.password from tmsuser t]
at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)

My table is set up as follows -
CREATE TABLE TMSUSER (
id BIGSERIAL NOT NULL,
userid VARCHAR(8) NOT NULL CHECK (userid <> ''),
password VARCHAR(8) NOT NULL CHECK (password <> ''),
PRIMARY KEY (id)
);

My Model file is as follows -
@Entity
public class TMSUser {
@Id
@GeneratedValue
private Integer id;
private String userid;
private String password;

The query in service file is as follows -
Query query = getEntityManager().createQuery("select t.id, t.userid,
t.password from tmsuser t");

I would greatly appreaciate yore help.

thanx
Shahab
--
View this message in context: http://www.nabble.com/%3Ctable-name%3E-is-not-mapped-tf3175392.html#a8809786
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Ido M. Tamir 2007-02-06 09:03:01 Re: <table name> is not mapped
Previous Message Do, Leon (Leon) 2007-02-05 15:59:11 Re: Max size for bytea type