Discussions

General J2EE: problem - database select with hibernate

  1. problem - database select with hibernate (1 messages)

    Env: Spring,Hibernate, SQLServer I am trying to fetch the records from "Image" table. My query is pretty simple: public List getAll() { return getHibernateTemplate().find("from Image"); } The query that gets generated by hibernate is: select image0_.UID as UID0_ from Image image0_ There is one problem though the table name doesn't have the schema. The query should have been select image0_.UID as UID0_ from schema.Image image0_ I am using BasicDataSource to connect and not sure how can I specify the schema name. jdbc:sqlserver://testdev01:1433 admin password Any help is appreciated. Thanks.
  2. Try to set default schema inside DB. Or rename schema.