請各位幫忙分析下,詳細描述如下:編寫了一個簡單的實體類Customer,和一個獲取Session的工具類,按照百度搜索的結果,檢查了hibernate配置文件和實體類映射文件,均沒有問題。但是執行到save方法時即報錯Unknown entity。打印獲取到的session信息為“SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=ExecutableList{size=0} updates=ExecutableList{size=0} deletions=ExecutableList{size=0} orphanRemovals=ExecutableList{size=0} collectionCreations=ExecutableList{size=0} collectionRemovals=ExecutableList{size=0} collectionUpdates=ExecutableList{size=0} collectionQueuedOps=ExecutableList{size=0} unresolvedInsertDependencies=null])”
添加回答
舉報
0/150
提交
取消