Please use the google group to ask questions - thanks.

by florin 28 Nov 15:51
Use MapBean rather than mapping to a Class type

I find that the MapBean is great for quick value pair access.

I do prefer, in addition to this, to have arbitrary sql mapped to java Classes; classes that are not already mapped as entity beans. And indeed the class attributes can be primitives only.

The thing is that for reporting and analysis or quick dirty data reads I just have to come up with ad hoc sql and using a MapBean will be as useful as jdbc but not more.

The value of Ebean is the freedom you gain to explore outside the accepted standard, for convenience or esoteric purposes.

Thanks for a great job.

30 Nov 21:21
by Rob

Yes, the feature to look at here is @SqlSelect. Where you specify raw sql to map to an entity bean.

I think the JPA approach to this was far too complex (as if they never looked at Ibatis).

The upside of the SqlSelect approach is that you can treat it like a normal entity bean further adding to the where (or having) clauses dynamically via code.

Create a New Topic

Title:
Body:
 
Introduction User Guide (pdf) Install/Configure Public JavaDoc Whitepapers
General Database Specific Byte Code Deployment Annotations Features
Top Bugs Top Enhancements
woResponse