我突然發現學習Java就是這樣的先給你說一大堆然后好不容易理解之后然后告訴你實際上這個更加的簡便實際上這些全部都能自動生成的。。。嘻嘻開個玩笑肯定看得懂才行啦
2016-01-13
hibernate中聲明集合屬性一般都需要初始化,因為要像其中添加數據。private Set<Student> students; 這行代碼如果想調試時不提示空指針
可以初始化一下:private Set<Student> students = new HashSet<Student>();
可以初始化一下:private Set<Student> students = new HashSet<Student>();
2016-01-08
額,執行SQL語句報錯~
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
2015-12-28
難怪以前老師說hibernate靈活性低,無法自己寫SQL涉及到復雜的SQL查詢,使用起來比起可以直接寫SQL查詢出對應數據的持久層框架感覺麻煩了好多
2015-12-26