Forgive me if this is a stupid question, but...
Will "asString" appear anywhere on your database, or are you just trying to figure out a way to make JPQL query on a value derived from a method?
[Message sent by forum member 'tware' (tware)]
http://forums.java.net/jive/thread.jspa?messageID=217142