Categories
java Mariadb

Java Mysql

Oh my… switched to java spring a while ago and finally started to log my notes. lots of jpa/hibernation to come..

In the database, the date column can be null. jpa doesnt like this.
one shop says that 2 different ways to get rid of the issue:
1.

UPDATE table SET datefield = NULL WHERE datefield = '0000-00-00 00:00:00';

I like it.
2.

jdbc:mysql://localhost:3306/yourMySqlDatabase?zeroDateTimeBehavior=convertToNull

I like it also.
I guess it is a preference thing. both methods are easy enough to implement. database defaults to null value …

Categories
java netbeans

Netbeans is awesome!

over the years, spent more time dealing with eclipse bugs and issues instead of my work, so it was time to move on which is the exact reason why I left microsoftland years ago.
Netbeans is now my “go to” editor for java, c++ and big projects. Listed will be reminders to how to use neat features in netbeans. shortcuts.

 JAVA class - cool netbeans shortcuts 

ALT-Insert will pull up a menu to let netbeans do get setters
sout - TAB will do the System.println.

... more to come.