Advertisement
Guest User

Untitled

a guest
Jun 16th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. Organization temp = (Organization) session.createQuery("FROM Organization o WHERE o.pid = "+pid).setMaxResults(1).uniqueResult();
  2.  
  3. java.lang.IllegalArgumentException: org.hibernate.QueryException: in expected: o [FROM Organization o WHERE o.pid = 5]
  4.  
  5. Organization temp = (Organization) session.createQuery("FROM at.nettania.dev.ntacadmin.core.organization.Organization o WHERE o.pid = "+pid).setMaxResults(1).uniqueResult();
  6.  
  7. <property name="connection.url">jdbc:mysql://localhost/testing</property>
  8. <property name="connection.username">root</property>
  9. <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
  10. <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
  11. <property name="connection.password">****</property>
  12. <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
  13. <property name="hibernate.jdbc.batch_size">0</property>
  14. <property name="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory</property>
  15. <!-- thread is the short name for org.hibernate.context.ThreadLocalSessionContext and let Hibernate bind the session automatically to the thread -->
  16. <property name="current_session_context_class">thread</property>
  17. <!-- this will show us all sql statements -->
  18. <property name="hibernate.show_sql">false</property>
  19. <!-- automatic creation of tables -->
  20. <property name="hibernate.hbm2ddl.auto">update</property>
  21. <property name="hibernate.temp.use_jdbc_metadata_defaults">false</property>
  22. <!-- JDBC Batch Size -->
  23. <property name="hibernate.jdbc.batch_size">20</property>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement