According to my research, a JPQL query containing a comparison to a literal Enum value should be supported in the fully-qualified form.
For example, "SELECT i FROM Item WHERE i.status = com.xyz.lib.ItemStatus.New". This is not currently working in OpenJPA, is this considered a bug? -Marc On 11/12/07, Marc Siegel <[EMAIL PROTECTED]> wrote: > Hi folks, > > Say I have an entity Item, with an @Enumerated column 'status'. > > How can I have a named query like this: > "SELECT i FROM Item WHERE i.status = 'New' " > > I've tried > "SELECT i FROM Item WHERE i.status = 'New' " > "SELECT i FROM Item WHERE i.status.name = 'New' " > "SELECT i FROM Item WHERE i.status = ItemStatus.New " > "SELECT i FROM Item WHERE i.status = com.xyz.lib.ItemStatus.New " > > To no avail. Any help? > > Thanks > -Marc >
