Main Contents
general
|
Comments (0)
If you have duplicate entries in a resultset of a hibernate query, then this could be caused by a eager fetchmode. A result is to add a ResulTransformer to your query.
Example:
Criteria criteria = getSession().createCriteria(Order.class);
criteria.setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
More Infos here: https://www.hibernate.org/117.html#A12
jazzanowak @ February 25, 2010
general
|
Comments (0)
If you want to get rid off the blue highlighting of focussed input fields in safari and google chrome you have to add the following style to your input fields:
input {
outline: 0 none;
}
textarea {
outline: 0 none;
}
jazzanowak @ January 16, 2010
iphone
|
Comments (0)
I found a very good framework for writing applications for multiple mobile devices like the iphone, blackberry or android.
The name is phonegap and you find it here.
I will write here in a few weeks about my experiences with it. But the idea behind the framework is cool. Instead of writing native code you write web […]
jazzanowak @ August 6, 2009
general
|
Comments (0)
I needed some simple functions for writing integegration tests with DbUnit.
Functions like:
NOW()
addDays(NOW(),1)
So I downloaded the source code of DbUnit and added them. You can downdload the patch here, or the patched jar here.
Short Documentation
In every DateTime field in your dbunit fixture you can use the following functions:
addDays(baseDate, days), addHours(baseDate, hours),
addMinutes(baseDate, minutes) and addSeconds(baseDate, seconds)
Example 1:
<table […]
jazzanowak @ July 18, 2009
general
|
Comments (0)
I looked for a possiblity to add a full text search to my application without using lucene.
What I found was the FULLTEXT index of mysql.
In Detail it is described here. I provide you a short summary:
1. Create a fulltext index
ALTER TABLE entities ADD FULLTEXT KEY search_text (title);
2. Execute a select
SELECT id,title FROM entities WHERE MATCH(title) […]
jazzanowak @ July 7, 2009
iphone
|
Comments (3)
I found a GOOD article about full text search on http://vafer.org/blog/20090107014544. The author describes there a way to port lucene on the iphone and how to use sqlites built in feature for text search on the iPhone. Both ways seemed to be a little bit to complex for my problem. The Lucene port seems not […]
jazzanowak @ May 29, 2009
documentation, rails
|
Comments (0)
I found a nice list of rails tutorals on this site : http://www.digitalmediaminute.com/article/1816/top-ruby-on-rails-tutorials
jazzanowak @ March 16, 2008
general, rails, ruby
|
Comments (2)
May be you heard about the web framework ruby on rails, and you want to give ti a try. Well, this post describes how you install ruby and rails on a windows computer in less then 10 minutes.
Installing Ruby
First you need to install ruby.
Download the latest ruby version from http://www.ruby-lang.org/en/downloads/ .
Execute the installer.
Add the […]
jazzanowak @ March 16, 2008
actionmailer, bugfix, rails
|
Comments (3)
If you try to use partials in an actionmailer template, you probably get the the following error message:
undefined method `controller_path’ for SupportMailer:Class
That is because the actionmailer does not support partials out of the box. (here is the belonging Trac Ticket) .
But there are two workarounds:
Patching the actionmailer staticly
This workaround is metioned in the […]
jazzanowak @ March 13, 2008
general
|
Comments (0)
Hello dear reader,
my Name is Daniel Nowak. This is my blog about my expriences with the programming language Ruby and the framework Rails. If you want to know more about me, plase read the about me page.
I hope you enjoy reading this blog. If you find anything anoying, please leave a comment.
jazzanowak @ March 12, 2008