Permalink
Browse files

All posts migrated

  • Loading branch information...
MarcinSwierczynski committed Apr 8, 2012
1 parent 3bed301 commit bb6f39cb9c7cc3f526e2e18c8689f97cab641d79
View
@@ -19,7 +19,7 @@ <h1 id="blog-title"><a href="/">Marcin Świerczyński's blog</a></h1>
{{ content }}
<div id="footer">
- <p>Copyright &copy; Marcin Świerczyński &middot; Design: <em>minimalistica</em> by Luka Cvrk, <a href="http://www.solucija.com/" title="Free CSS Templates">Solucija</a></p>
+ <p>Copyright &copy; Marcin Świerczyński &middot; Design based on: <em>minimalistica</em> by Luka Cvrk, <a href="http://www.solucija.com/" title="Free CSS Templates">Solucija</a></p>
</div>
</div>
</body>
View
@@ -28,7 +28,7 @@ <h1><a href="/">Marcin Świerczyński's blog</a></h1>
{{ content }}
<div id="footer">
- <p>Copyright &copy; Marcin Świerczyński &middot; Design: <em>minimalistica</em> by Luka Cvrk, <a href="http://www.solucija.com/" title="Free CSS Templates">Solucija</a></p>
+ <p>Copyright &copy; Marcin Świerczyński &middot; Design based on: <em>minimalistica</em> by Luka Cvrk, <a href="http://www.solucija.com/" title="Free CSS Templates">Solucija</a></p>
</div>
</div>
</body>
@@ -27,7 +27,7 @@ You have to use SequenceStyleGenerator with its parameter – initial_value. You
-
+{% highlight scala %}
class FirstClass {
static mapping = {
id(generator: 'org.hibernate.id.enhanced.SequenceStyleGenerator',
@@ -43,7 +43,7 @@ You have to use SequenceStyleGenerator with its parameter – initial_value. You
}
...
}
-
+{% endhighlight %}
@@ -53,7 +53,7 @@ Unfortunately, in this case you’ll finish with the same sequence generator in
-
+{% highlight scala %}
class FirstClass {
static mapping = {
id(generator: 'org.hibernate.id.enhanced.SequenceStyleGenerator',
@@ -69,7 +69,7 @@ Unfortunately, in this case you’ll finish with the same sequence generator in
}
...
}
-
+{% endhighlight %}
@@ -28,17 +28,17 @@ Let’s define an Invoice class with a few fields: number, draw date and payment
-
+{% highlight scala %}
class Invoice {
- String number;
- Date drawDate;
- Date paymentDate;
+ String number
+ Date drawDate
+ Date paymentDate
static constraints = {
- number(blank: false);
- drawDate(blank: false);
+ number(blank: false)
+ drawDate(blank: false)
}
- }
-
+ }
+{% endhighlight %}
@@ -50,9 +50,9 @@ It looks good, doesn’t it? You can generate controller and views for that clas
-
- def invoice = new Invoice(number: “1/2010”, drawDate: new Date()).save();
-
+{% highlight scala %}
+ def invoice = new Invoice(number: “1/2010”, drawDate: new Date()).save()
+{% endhighlight %}
@@ -76,18 +76,18 @@ What can you do? You can set an explicit constraint for such a field: “nullabl
-
+{% highlight scala %}
class Invoice {
- String number;
- Date drawDate;
- Date paymentDate;
+ String number
+ Date drawDate
+ Date paymentDate
static constraints = {
- number(blank: false);
- drawDate(blank: false);
- paymentDate(nullable: true);
+ number(blank: false)
+ drawDate(blank: false)
+ paymentDate(nullable: true)
}
}
-
+{% endhighlight %}
Oops, something went wrong.

0 comments on commit bb6f39c

Please sign in to comment.