News for hackers. Stuff that matters.
Re:The myth of using Scala as a better Java by Consultant32452 on Thursday March 02, 2017 @10:37AM (#13774771)
IMO that's still bad design on the end user of the ORM library. There's a time and place to use tools like Hibernate, but it became fashionable so it's used all over the place where it doesn't fit and has created huge messes.

There's a really bad trend in the industry of choosing libraries or tools based on trying to improve your resume, rather than trying to find the best solution to a problem.

Re:The myth of using Scala as a better Java by cryptonector on Thursday March 02, 2017 @06:35PM (#13779400)
I've worked with a number of ORMs, mostly home-grown, admittedly.

I've yet to see a good one.

Often ORMs fail to implement JOINs efficiently.

Every ORM fails to give you a powerful query language: if they had a powerful query language, someone would write an ORM for the ORM, because the reason ORMs exist is that "SQL is hard", as the doll says, and any powerful query language will get the same treatment. But SQL is not really hard, and not having SQL eventually means you pay a huge price.

And then there's things like LDAP, which are absolutely awful. LDAP's object naming scheme has no canonical text representation. Let that sink in. And that's not even the main problem -- forcing your database to be hierarchical and a collection of objects, with no standard relation/pointer type, is. (Yes, Active Directory has an Object DN type, I'm aware.)

Just say NO to ORMs.

Re:The myth of using Scala as a better Java by greenleafjacob on Friday March 03, 2017 @04:47AM (#13781782)
This is a well known issue [1], and isn't due to ORMs being poorly written.

It's not true that people who know SQL always prefer using it to using an ORM. In one of my prior jobs we had strict controls on the queries that ran in production for performance reasons. We screened all of the query plans the planner generated, but we also used an ORM. Sometimes we needed to work around or even reimplement the queries that used to be in SQL due to niche features like index hinting or the HAVING clause. And yet usually we used the ORM because it was more concise and reduced manual mapping of columns to fields.

[1]: https://en.wikipedia.org/wiki/Object-relational_impedance_mi...

Re:The myth of using Scala as a better Java by willtim on Thursday March 02, 2017 @12:39PM (#13776197)
Absolutely, just look at all the Hadoop users who don't really have big data.