Activity log for bug #774677

Date Who What changed Old value New value Message
2011-05-01 07:11:41 Matt Giuca bug added bug
2011-05-01 07:20:07 Matt Giuca description I am having trouble creating GameData objects and persisting them in the database. I created a GameData object like this (in DataTestServiceImpl.populateDatastore): GameData[] games = new GameData[] { new GameData("test", devteams[0]) }; pm.makePersistentAll(games); Then, clicking the Populate button results in this error at runtime: > The owner field game of element class au.edu.unimelb.csse.mugle.server.model.AchievementData > has an incorrect type "au.edu.unimelb.csse.mugle.shared.model.Game". Should be > "au.edu.unimelb.csse.mugle.server.model.GameData" That is on the line: pm.makePersistentAll(games); I assume this is because we have a class GameData which has a Set<AchievementData> mappedBy "game", but the AchievementData's game field has type Game. I believe that AchievementData's game field should have type GameData. Am I correct? I replaced all uses of the Game type in AchievementData with GameData. This fixes that error, but now it generates another exception on the same line: > Class "au.edu.unimelb.csse.mugle.server.model.GameData" has collection field "achievements" > and this has no mapping in the table for the element class > "au.edu.unimelb.csse.mugle.server.model.AchievementData" owner field "game" I can't figure this one out. The GameData.achievements field has type Set<AchievementData> mappedBy "game", and the AchievementData.game field has type GameData. This seems to be the normal way of doing things in https://code.google.com/appengine/docs/java/datastore/jdo/relationships.html, so why is it giving this error? I am having trouble creating GameData objects and persisting them in the database. I created a GameData object like this (in DataTestServiceImpl.populateDatastore):       GameData[] games = new GameData[] {                                         new GameData("test", devteams[0])                                       };       pm.makePersistentAll(games); Then, clicking the Populate button results in this error at runtime: > The owner field game of element class > au.edu.unimelb.csse.mugle.server.model.AchievementData > has an incorrect type "au.edu.unimelb.csse.mugle.shared.model.Game". Should > be "au.edu.unimelb.csse.mugle.server.model.GameData" That is on the line:     pm.makePersistentAll(games); I assume this is because we have a class GameData which has a Set<AchievementData> mappedBy "game", but the AchievementData's game field has type Game. I believe that AchievementData's game field should have type GameData. Am I correct? I replaced all uses of the Game type in AchievementData with GameData. This fixes that error, but now it generates another exception on the same line: > Class "au.edu.unimelb.csse.mugle.server.model.GameData" has collection > field "achievements" and this has no mapping in the table for the element > class "au.edu.unimelb.csse.mugle.server.model.AchievementData" owner > field "game" I can't figure this one out. The GameData.achievements field has type Set<AchievementData> mappedBy "game", and the AchievementData.game field has type GameData. This seems to be the normal way of doing things in https://code.google.com/appengine/docs/java/datastore/jdo/relationships.html, so why is it giving this error?
2011-05-01 07:38:17 Scott Ritchie mugle: assignee Scott Ritchie (sritchie)
2011-05-01 13:11:36 Scott Ritchie mugle: status Triaged In Progress
2011-05-01 15:01:49 Scott Ritchie mugle: status In Progress Fix Committed
2011-05-26 03:32:50 Matt Giuca mugle: status Fix Committed Fix Released