Tuesday, March 18, 2008

You should not be alone

When you think that you're alone, you should not be alone.
Especially if you're in a position where you should decide what to do, which way to go, how do things should be done, how do we organize things, how to we adhere to standards, etc.

Remember, you have your team supporting you, talk with them (not to them) and heaven knows, they will give you input that you never think of before.
It just a matter of gathering scattered information and from there on make the decision and learn from it.

Monday, March 10, 2008

Many to many relationship in JPA

I'm using JPA here and I got two objects A and B, the relationship is many to many and B is the owner.
I want to delete object A but still preserving B, the problem is I got a constraint exception since there's a record in the link table which keep a reference to the record that I intended to delete in A.

The solution is to create a native query to remove the row in the link table, then I can remove A.
Hibernate (as my friend said) doesn't have this limitation, so far I don't find the same solution in JPA.

Regarding HQL, there're times where I must revert back to native query to get things done correctly and I wonder is it me that doesn't really know HQL or is it HQL's limitation? sample case I hope will follow later.

Saturday, March 01, 2008



It's amazing, I just can't stop recommending firebug to all my colleagues. It's almost like all in one package solution, so far I almost ditch WebDeveloper plugin away (almost here... :) but I'm keeping it in case I might need it.

From modifying css "live", debugging javascript until modifying html element "live", all these you can do in firebug.

I'm not Firebug evangelist, I'm just being a satisfied customer here :) very very satisfied one.