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
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
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
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