請(qǐng)各位幫忙分析下,詳細(xì)描述如下:編寫了一個(gè)簡(jiǎn)單的實(shí)體類Customer,和一個(gè)獲取Session的工具類,按照百度搜索的結(jié)果,檢查了hibernate配置文件和實(shí)體類映射文件,均沒有問題。但是執(zhí)行到save方法時(shí)即報(bào)錯(cuò)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])”
添加回答
舉報(bào)
0/150
提交
取消