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.
Subscribe to:
Post Comments (Atom)
odd string diff
https://leetcode.com/problems/odd-string-difference/ Beats 19.92% of users with Java class Solution { public String oddString ( S...
-
bu durum sessionun uzun ömürlü olmasını istediğinizde yapacağınız bişeydir ki Session["eblek"]="gobalak"; dediğimizde ve...
-
Yeni nesil hacker'lar: Edwin Pena | Olympos Security koptum okuyunca yazılımcılar ve pazarlamacılar bu kadar kısa ve özlü bir hikayeyle ...
-
https://leetcode.com/problems/odd-string-difference/ Beats 19.92% of users with Java class Solution { public String oddString ( S...
No comments:
Post a Comment