JavaLeaks - the board

declare default value for an database field in hibernate

posted by JavaWorker, somewhen, somehow

JavaWorker


(Java crack)
i´m workin´ on a project for quite some time now. while accessing a database from my java programm, i was forced to use hibernate because these orm things are "state of the art". i had many problems to solve before i was abled to fire my first query at the database, but after a couple of month i had it workin´ now. there´s just one problem left (at the moment). i wonder how could i declare an default value for a database field in my entity? thanking you in anticipation!
posted by JavaGod, after quite some time

JavaGod


(uber-expert)
the java persistence api is giving you the opportunity to do such things by using annotations. in case of hibernate, they just forgot to implement it!
posted by JavaWorker, somewhen, somehow

JavaWorker


(Java crack)
how could that be in such an frequented framework?
posted by JavaGod, after again quite some time

JavaGod


(uber-expert)
well, that´s an easy one! because those orm-people do know nothing about databases, they´re just fetching objects and stuff.
posted by JavaWorker, sometime, somewhere

JavaWorker


(Java crack)
is there any hack or trick how it is possible to do such things?
posted by Admin, ligthning fast

Admin


(non questionable)
real java programmers do not need tricks or shortcuts! this threat is closed!
back to overview