java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: MIG_APP_ASSESSMENT_INFO is not mapped [SELECT assessmentstatus FROM MIG_APP_ASSESSMENT_INFO WHERE appkey=‘MY_APPKEY’]
Can you provide a working example for this?
Thanks in advance!
@adam.labus Using native queries strikes me as dangerous, given the range of databases most Atlassian host products (and thus the plugins we develop) have to support.
I did give it a go and got a different, but I think related, error.
When I try this native query (with a table that my plugin is creating)
SELECT f from AO_XXXXXX_TABLE f
JOIN content c
ON c.contentid = f."CONTENT_ID"
WHERE c.spaceid = 98305;
I get this error:
javax.persistence.PersistenceException: org.hibernate.MappingException: No Dialect mapping for JDBC type: 2002
To me this is indicative of the same root issue, where Confluence-Hibernate doesn’t know about the tables that I’m adding via ActiveObjects.
I was able to get to get results that look correct with a subtle change to my query (selecting * instead of f from my table), but I’m still nervous about using native queries.
SELECT * from AO_XXXXXX_TABLE f
JOIN content c
ON c.contentid = f."CONTENT_ID"
WHERE c.spaceid = 98305;