eu tenho o seguinte mapeamento
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 23/05/2007 11:37:55 by Hibernate Tools 3.2.0.b9 -->
<hibernate-mapping>
<class name="com.br.ibf.patio.bean.Usuario" table="usuario" schema="db_patio">
<id name="idUsuario" type="int">
<column name="idUsuario" />
<generator class="native" />
</id>
<property name="nome" type="string">
<column name="nome" length="50" not-null="true" />
</property>
<property name="login" type="string">
<column name="login" length="20" not-null="true" />
</property>
<property name="senha" type="string">
<column name="senha" length="20" not-null="true" />
</property>
<set name="agendas" inverse="true">
<key>
<column name="idUsuario" not-null="true" />
</key>
<one-to-many class="com.br.ibf.patio.bean.Agenda" />
</set>
</class>
</hibernate-mapping>
reparem que existe o idUsuario
tenho o seguinte bean
public class Usuario implements java.io.Serializable {
private Integer idUsuario;
private String nome;
private String login;
estou usando o banco POSTGRES
quando eu tento fazer uma consulta simples pra retornar um LIST
da o seguinte erro
(impl.SessionFactoryImpl 161 ) building session factory
(impl.SessionFactoryObjectFactory 82 ) Not binding factory to JNDI, no JNDI name configured
Hibernate: select this_.idUsuario as idUsuario11_0_, this_.nome as nome11_0_, this_.login as login11_0_, this_.senha as senha11_0_ from db_patio.usuario this_ limit ?
(util.JDBCExceptionReporter 77 ) SQL Error: 0, SQLState: 42703
(util.JDBCExceptionReporter 78 ) ERROR: column this_.idusuario does not exist
Exception in thread "AWT-EventQueue-0" org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2214)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at com.br.ibf.banco.HibernateGenericDAO.list(HibernateGenericDAO.java:74)
at com.br.ibf.patio.view.PatioFrame.jButton1MouseClicked(PatioFrame.java:325)
at com.br.ibf.patio.view.PatioFrame.access$500(PatioFrame.java:25)
at com.br.ibf.patio.view.PatioFrame$3.mouseClicked(PatioFrame.java:243)
é mostrado o select
select this_.idUsuario as idUsuario11_0_, this_.nome as nome11_0_, this_.login as login11_0_, this_.senha as senha11_0_ from db_patio.usuario this_ limit ?
mas ele diz que não existe o idusuario
mas tem o idUsuario, em nenhum mapeamente, ele sempre fala que o ID da tabela não existe
sera que pode ser algo referente ao sequence?
obrigado a todoss