2014-02-11 37 views
1

我跟着的AppFuse快速入門指南的模塊化和完整的源選項中選擇。當我發出AppFuse的快速啓動模塊化完整的源失敗testUpdateUser(

mvn install -Poracle 

testUpdateUser拋出一個...

.hibernate4.HibernateSystemException: Found shared references to a collection...model.User.roles 

我的理解是,這是因爲測試代碼試圖這樣做(這是休眠不允許的。)

user2.setRoles(user.getRoles());

那麼測試updateUser的正確方法是什麼?

回答

0

你正在使用什麼版本的AppFuse?這應該固定在3.0。

0

這是原型......我用生成的項目..

....原型-DarchetypeVersion = 3.0.0

完整的語句(從快速入門複製..)

MVN原型:生成-B -DarchetypeGroupId = org.appfuse.archetypes -DarchetypeArtifactId = AppFuse的模塊化 - 彈簧 - 原型-DarchetypeVersion = 3.0.0 -DgroupId = com.mycompany -DartifactId = myproject的-DarchetypeRepository = http://oss.sonatype.org/content/repositories/appfuse