-
1. Re: When to use EntityQuery
andygibson.contact.andygibson.net Oct 20, 2008 5:14 PM (in response to sushi6677)I use them pretty much all the time.
The documentation and the examples were written mainly before the entity() classes came about.
If you look at a Seam Gen'd app with generated classes and so on, they use the entity() pretty exclusively.I use them for holding CRUD entities or entity result sets. If I need a static list, say a list of lookup values, I would use a regular bean and an entity manager. If I'm looking up entities based on an id and I need to perform CRUD on it, I'll use an EntityHome. If I need a list of entities (say a list of support issues for a project, or a set of search results) I'll use the entity query. Not only can I query using EL, but it also gives me the ability to paginate and order easily.
Cheers,
Andy
-
2. Re: When to use EntityQuery
andygibson.contact.andygibson.net Oct 20, 2008 5:20 PM (in response to sushi6677)Gah, that'll teach me to preview before I post.
entity() = entity(*)
Cheers,
Andy