Is there a way to show what queries are actually being executed from within a Java class?
I'm getting the exception:
Exception in thread "main" [ObjectDB 2.5.4_05] javax.persistence.NonUniqueResultException
However, I'm unable to debug it because I don't know what the query's actually searching for. I would like to log (in the console or in a separate log file) what it's actually executing without setting it in xml but rather through Java if possible?
Query debugging configuration from class
#1
#2
If you have the Query instance (e.g. in a catch clause), you should be able to use toString to obtain the query string.
ObjectDB Support