Changes for page WebObjects and Squeryl
Last modified by Ravi Mendis on 2011/04/01 11:14
From version 61.1
edited by Ravi Mendis
on 2011/02/27 23:20
on 2011/02/27 23:20
Change comment:
There is no comment for this version
To version 64.1
edited by Ravi Mendis
on 2011/03/25 04:58
on 2011/03/25 04:58
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -8,7 +8,7 @@ 8 8 * Scala Actor compatible 9 9 ** Immutable object model/graph 10 10 ** Explicit transaction control 11 -* Strongly-typed11 +* Type Safety 12 12 ** Better suited for database/business "logic". 13 13 E.g: Exploits the compiler and IDE to catch exceptions at compile time rather than at run-time. 14 14 * Uses Scala collection classes ... ... @@ -45,3 +45,15 @@ 45 45 * Optional attributes (i.e those that ##allowsNull##) are typed as ##OptionT## 46 46 * To one relationships that are not mandatory (i.e optional relationships) are also typed as ##OptionT## 47 47 * To many relationships are represented as a Squeryl iterable (collection class) as opposed to a ##NSArray##. 48 + 49 +=== Use of Scala Collections === 50 + 51 +===== 1. Filtering ===== 52 + 53 +Instead of using EOQualifiers to filter EOs dynamically, you can apply the type safe filter in Scala: 54 + 55 +{{code}} 56 + 57 +def activeFiles = files.filter(_.active == 1) 58 + 59 +{{/code}}