четверг, 26 ноября 2009 г.

DbUnit. Nil in flat xml file.

Sometimes DbUnit insert 32768 value into database instead of specified 0 in flat xml file. So <TABLE_NAME id="0"/> become INSERT INTO TABLE_NAME(ID) VALUES (32768); I dont have a time to "wash inside out" it. And do not forget about column sensing with DbUnit, it can save a lot of time for you.

пятница, 20 ноября 2009 г.

Imperial measurements in metric contries

I guess some xerox engineer are idiots, They are put imperial measurement system in workcenter m118 for countries, with metric measurement system.

пятница, 6 ноября 2009 г.

Domain Driven Design, Hibernate, Hibernate Tool and Hibernate Search can (not) work together.

Turn inside out and look what you have. Do not belive in fairy tales.

What have at the moment:
  • anemic domain model;
  • domain API (interfaces);
  • xml hibernate mapping (with some advanced tricks like meta and java code injection);
  • generated from xml hibernate entities, that implements domain API.

I want to add full text search to existing stuff, of cause the first solution - lets use hibernate search ! Do you belive, that is possible ? I was too naive and believed that is possible.

In depth:
  • impossible to configure hibernate search with xml
  • impossible to annotate entity interface with @Indexed, @Field, etc. because hibernate search look for annotation in class only
  • hibernate tools not support <meta> tags for hibernate search.

So im gonna to throw hibernate search away and use something like compass or hack it