[ebean] SqlSelect deprecated in favour of RawSql

159 views
Skip to first unread message

Rob Bygrave

unread,
May 3, 2010, 7:08:05 PM5/3/10
to ebean@googlegroups
The RawSql is significantly better than the existing SqlSelect feature.

I'm going to deprecate the use of SqlSelect in v2.6 and keen to remove it shortly after that. I'm hoping people using SqlSelect will move in a timely fashion to the new RawSql approach.

If anyone has problems or concerns with this let me know.

Note that you will be able to put RawSql queries into a META-INF/ebean-orm.xml file and use them as "named queries". I have no plans to support putting named RawSql queries in annotations (like we can with SqlSelect).



Cheers, Rob.

Ω Alisson

unread,
May 3, 2010, 7:10:36 PM5/3/10
to eb...@googlegroups.com
Why no annotations support?

Rob Bygrave

unread,
May 3, 2010, 8:18:36 PM5/3/10
to eb...@googlegroups.com
> Why no annotations support?

Well I figure it depends on the size and complexity of the SQL statement but my thoughts are that:

- Generally you want to be able to easily cut n paste the SQL to/from an external query tool
- Formatting even a medium sized SQL statement using Java String concatenation is relatively painful.

Now there was talk (for Java7) of being able to have multi-line strings in Java and if that happened then these two issue would go away as far as I'm concerned.
 
Don't let me stop you asking for annotation support though...


Cheers, Rob.

2010/5/4 Ω Alisson <thelin...@gmail.com>
Reply all
Reply to author
Forward
0 new messages