,當我在我的服務器端查詢休眠創建更改列表對象休眠回報
(em.getEntityManagerFactory().createEntityManager().createNativeQuery("select..."))
形式的一些對象,包括Java列表 休眠回報org.hibernate.collection.PersistentList
現在,當我嘗試發送這個對象我java客戶端他不知道這
org.hibernate.collection.PersistentList
對象,當我嘗試反序列化(並且我不想將此hibernate.jar添加到客戶端)。
有沒有辦法讓hibernate返回普通的java列表? 現在我把每個查詢都替換成普通的java列表或java Arraylist ,然後我把這個對象發送到客戶端。 (Json不是一個選項)。
在此先感謝。