I also looked at the source of the exception in the addPath method of EJBQLParser.jtt. It seem like the only CMR fields are allowed to have a dots after them. Is it possible to add DVC field to the possibilities?
I imagine other parts of the code need to be changed for DVC fields to be accessed by query methods.
Is it a lot of work?
This won't be that difficult. The tokenizer and ASTPath objects will need to be expanded to support properties. The real challenge is modifying the JDBCEJBQLCompiler because it assumes that a cmp-field is the last element in a path
Eventually, I will add this, but it is a low priority. If you do want to add it you will need to modify the JBossQLParser.jtt, as the EJBQLParser is the spec compliant parser and this is an extension.
You can use DeclaredSQl in the meantime.