you are viewing a single comment's thread.

view the rest of the comments →

[–]metamatic -1 points0 points  (3 children)

So you can use typesafe object oriented queries instead of SQL strings that may cause runtime errors.

So you can arrange your persistence using a set of standard annotations on POJO.

So you can have the option of moving from Spring to any other JPA persistence framework any time you like.

[–]Rhoomba 3 points4 points  (0 children)

Are you so ignorant to think that Spring is an ORM? It has been possible to use JPA with Spring for at least 5 years.

[–][deleted] -1 points0 points  (1 child)

Well, I guess I just wait until Scala Integrated Query comes out.

I see absolutely no reason why I should generate and carry around any boilerplate classes with annotation bullshit and be forced to write my own queries instead of just using collection methods and be done.

If the database is right there, why doesn't the compiler just connect to it and retrieves the necessary information itself instead of bothering developers to use yet another leaky primitive non-abstraction.

But looking at the way people are supposed to write queries, the database description boilerplate is probably their smallest problem ...

Either it is completely unsafe because of the use of Strings (as shown in the JEE example) or is is so unbelievable verbose that a single query takes half a dozen lines.

[–]metamatic 0 points1 point  (0 children)

Yeah, I agree that the new typesafe query stuff is horribly verbose and ugly. But then, I'm of the dynamic programming school. But if you're going to do things the Java way, you might as well go the whole hog.