I was writing some simple slide generator. and in that process I write hbm.xml file and put this line in there.
<property name="photoSlideId" column="photo_slide_id" type="long" not-null="false" length="8" />
then I put needed variable into the class like this:
private long photoSlideId;
then I start to get photos list as null. it was impossible because it has to generate a exception or something in that situation. then I realized that this code was trying to assign null into the "long" type variable. it was impossible because in java we cannot assign null into the primitive types. then I changed class like this
private Long photoSlideId;
and its working like a charm.
Wednesday, January 30, 2008
Hibernate and null fields
Subscribe to: Post Comments (Atom)
strangely I start liking diablo immortal in mobile, and now decided to install in windows :)
at the end of any product there will be a reporting interfaces for counts. let say you build a advertisement site which gives people to publ...
In order to use jhipster user system I needed to find out how to call jhipster, I am planning to do this with curl because it is easiest wa...
if you have wl11 ejb server and in that environment generated ejb client and deploy to wl12 it will give you this exception java.lang.NoSu...
Post a Comment