> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
I suggest you write the count query by hand, using JPA.em().createNativeQuery().
Indeed, that most likely won't work.
One idea in that case would be to use your own superclass for models
that extends the play Model class, and then to write an Enhancer that
will replace the default count() method added by the play JPA
enhancer. Have a look at play.db.jpa.JPAEnhancer, I think you should
be able to redefine (remove + add) the count() method for subclasses
of your own class. One thing I am not sure about though is in which
order the Enhancers will be called but with a bit of luck the built-in
enhancers are applied before other Enhancers.