Ok, i cannot handle it anymore... It just takes too much time and effort to make some specific things working correctly!
I believe it is cool system, but not for software development using latest technologies like GWT.
I am switching back to Windows. I will miss Ubuntu and bash... Especially bash!
Tuesday, November 3, 2009
Thursday, September 17, 2009
Hibernate, versioning and DRY
Recently i was working on a project, where we were using "tracked" objects. This is a kind of versioning mechanism, implemented on DB level using triggers.
When i was starting to implement tracked objects in Hibernate, i've noticed that there are few properties that every tracked object has:
There are four types of inheritance relation used in Hibernate, well-described here:
Turns out copy-pasting all these versioning information is the best way to do things? Looks like this.
When i was starting to implement tracked objects in Hibernate, i've noticed that there are few properties that every tracked object has:
- T_PK - primary key in table with versions
- T_START - starting moment for transcation
- T_END - end moment for transcation
There are four types of inheritance relation used in Hibernate, well-described here:
http://simsonlive.wordpress.com/2008/03/09/how-inheritance-works-in-hibernate/
http://javavibes.wordpress.com/2009/06/22/hibernate-inheritance/
- One table per concrete class
That sounded good at first glance, but it allows the reusing only on java side, and i don't care about it too much because it is auto generated. - One table per concrete class with union-subclass mapping
In this case all versed objects should be a <union-subclass>, plus they have to be in one hibernate mapping file with the parent class.
Not sure if it is ok... It may produce what i want, but i have all the versed objects in one place. This option is supposed to be used for polymorphic queries, and i want to just have all the fields in one place. - One table per class hierarchy
It is just not suitable at all, we have a bunch of tables instead of one. - Implicit polymorphism
Again, not suitable because java objects are generated.
http://docs.jboss.org/hibernate/stable/core/reference/en/html/components.htmlGot a few problems here also:
- ID couldn't be a part of aggregated object
- It is copy-pasting too
- hbm2java produces strange things when component is in place (maybe i was doing something wrong, i haven't dig deep there)
Turns out copy-pasting all these versioning information is the best way to do things? Looks like this.
Friday, August 28, 2009
VMware player - the ultimate hotkey destroyer
I've encountered very annoying issue while using VMware player - all my Linux hotkeys were suddenly dropped out when vmplayer was launched. I couldn't even open a new tab in Firefox until i execute setxkbmap command.
After searching on google and investigating different options for virtual machine i've found combination that particially solved problem.
<Win XP>.vmx file
After searching on google and investigating different options for virtual machine i've found combination that particially solved problem.
<Win XP>.vmx file
- isolation.tools.dnd.disable = "TRUE"
- isolation.tools.copy.disable = "TRUE"
- isolation.tools.paste.disable = "TRUE"
- mks.keyboardFilter = "off"
Subscribe to:
Comments (Atom)