Java - Sencetencia HQL da error por las FK y con SQL bien

 
Vista:

Sencetencia HQL da error por las FK y con SQL bien

Publicado por Rafael (2 intervenciones) el 28/10/2010 12:09:24
Hola buenos dias, he mapeado la BD con la ingeniera inversa de netbeans que ofrece para hibernate. Y al hacer una sentencia HQL a cualquier tabla da el siguiente error:

org.hibernate.MappingException: An association from the table participa refers to an unmapped class: PODJOs.Actividad
at
org.hibernate.cfg.Configuration.secondPassCompileF oreignKeys(Configuration.java:1252)
at org.hibernate.cfg.Configuration.secondPassCompile( Configuration.java:1170)
at org.hibernate.cfg.AnnotationConfiguration.secondPa ssCompile(AnnotationConfiguration.java:324)
at org.hibernate.cfg.Configuration.buildSessionFactor y(Configuration.java:1286)
at org.hibernate.cfg.AnnotationConfiguration.buildSes sionFactory(AnnotationConfiguration.java:859)

En este caso el HQL es "from USuario", probé a hacer una sentencia SQL "select * from usuario" y esta vez si devuelve las filas. Ambas las ejecuto desde netbeans, me da a entender que hay algún problema de relaciones, pero no logró comprender porque da ese error ya que solo pido las filas de una tabla no los joins, y tampoco entiendo por HQL peta y SQL devuelve las filas.

saludos¡
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder