pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
<table name> is not mapped
2+ messages / 2 participants
[nested] [flat]

* <table name> is not mapped
@ 2007-02-05 16:37 shahab <smahtab@pershing.com>
  2007-02-06 09:03 ` Re: <table name> is not mapped Ido M. Tamir <tamir@imp.univie.ac.at>
  0 siblings, 1 reply; 2+ messages in thread

From: shahab @ 2007-02-05 16:37 UTC (permalink / raw)
  To: 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.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: <table name> is not mapped
  2007-02-05 16:37 <table name> is not mapped shahab <smahtab@pershing.com>
@ 2007-02-06 09:03 ` Ido M. Tamir <tamir@imp.univie.ac.at>
  0 siblings, 0 replies; 2+ messages in thread

From: Ido M. Tamir @ 2007-02-06 09:03 UTC (permalink / raw)
  To: pgsql-jdbc

shahab wrote:

> 
> 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
> 
> 
> My Model file is as follows -
> @Entity
> public class TMSUser {
>     @Id
>     @GeneratedValue
>     private Integer id;
>     private String userid;
>     private String password;
> 

You have to go to the hibernate forum at hibernate.org.
But I think your problem is that class names are case
sensitive in HQL: 
select t.id, t.userid, t.password from TMSUser t

HTH
ido




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-02-06 09:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-02-05 16:37 <table name> is not mapped shahab <smahtab@pershing.com>
2007-02-06 09:03 ` Ido M. Tamir <tamir@imp.univie.ac.at>

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