avatar

Andres Jaimes

Examples of ‘for’ queries with Scala

On this page you are going to find some examples of ‘for’ queries.
Let’s start by defining the following database:

 1case class Book(title: String, authors: List[String])
 2
 3val books: List[Book] = List(
 4  Book("structure and interpretation …

PlayFramework – Java

So far I have really liked this concept. The only con is that some times is difficult to find full examples that use the latest version.

Installing sbt

We need sbt for compiling and running Play applications.

brew install sbt@1

Executing a first …

How to run a custom update using Java JPA

From time to time it is necessary to execute a query without using Java’s JPA infrastructure.

In order to do it, we have to define a NamedQuery to execute. In this example, I will run an update against the database.

@Entity
@NamedQueries ({ …

Quick lessons on working with Java’s BigDecimal

Today I bring an example of the different results you can expect when using Java’s BigDecimal class. From instantiation to applying different arithmetic operations, it is important to understand how they affect the resulting instances.

The following …