Is it possible to use index as a column name in sqlite?
When i try to execute this query, it is generate with hibernate/jpa:
select
metadatait0_.id as id25_,
metadatait0_.guid as guid25_,
metadatait0_.index as index25_,
metadatait0_.library_section_id as library7_25_,
metadatait0_.metadata_type as metadata4_25_,
metadatait0_.parent_id as parent5_25_,
metadatait0_.title as title25_
from
metadata_items metadatait0_
I get the following error:
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140)
...
Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "index": syntax error)
Try including column name in square brackets:
metadatait0_.[index] as index25_,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With