pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: shahab <smahtab@pershing.com>
To: pgsql-jdbc@postgresql.org
Subject: <table name> is not mapped
Date: Mon, 5 Feb 2007 08:37:48 -0800 (PST)
Message-ID: <8809786.post@talk.nabble.com> (raw)


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.




view thread (2+ messages)  latest in thread

Message-ID: <8809786.post@talk.nabble.com>
Permalink:  ../8809786.post@talk.nabble.com/
Also on:    postgresql.org/message-id/8809786.post@talk.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: smahtab@pershing.com
  Subject: Re: <table name> is not mapped
  In-Reply-To: <8809786.post@talk.nabble.com>
  References: <8809786.post@talk.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox