4 ms·
>> The problem I can see is that its not totally type safe as you still need to run the code to check that your entity is compatible with the underlying table a
by RasputinJones2 14y ago
>> The problem I can see is that its not totally type safe as you still need to run the code to check that your entity is compatible with the underlying table at runtime. If I am wrong here please correct me.
With pleasure. You are wrong. SLICK (formerly known as ScalaQuery) is Typesafe.
>> I am working with Play! at the moment and while the DB access is the best I have come across in the Java world
I've been working with Scalaquery with Play 2 for two months now. The experience has been fantastic. I haven't really had any queries I haven't been able to create even complex joins.
The approach where queries are made like Scala collections is really intuitive. Compared to you I just started using linq recently for a work related project. Basically coming from the other end and I've been quite pleased that the SQ skills I've built over the past month transferred over reasonably well. I only have good things to say about Slick. You should try it out.
- boyter 14y agoIts only typesafe if you generate against the database though correct? Its entirely possible for me to write it by hand, and not know there is a problem till runtime yes? I want to close this loop, and LINQ is the only db access I have tried that does so. Should have mentioned I am using Scala for the DB access in Play 2.0 and the other portions are mostly Java (heavy lifting done in existing libraries, so its just plumbing work hence doing it in Java). I am pretty happy with it except I still hit type issues which I would never encounter in LINQ. I guess the way im looking at it is that LINQ solved a pain point for me which I am still experiencing in other languages. I would very much like someone to take the pain away from me, either by getting C# working well on Linux or bringing some of the features from C# over into the Java world.