I need to use a custom query for my application so this is my simplified code:
List<myDAO> findByName ( String Name ); @Query("SELECT Company, count(Name) FROM my_table GROUP BY Company") List<myDAO> getNamesOfCustom ( String Name ); The first query works fine, the second is not, and I'm getting:
org.hibernate.hql.internal.ast.QuerySyntaxException: my_table is not mapped I specified the table name in my DAO. Could the problem be with the table name if the first query is working?
SELECT Company, count(Name) as field_name FROM my_table GROUP BY Companydbo? Is the connection mapped to a different database?