Index: trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 9993)
+++ trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java	(revision 9994)
@@ -2,4 +2,7 @@
 package org.openstreetmap.josm.data.osm;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -73,3 +76,24 @@
     @Override
     public abstract OsmPrimitiveType getType();
+
+    private void writeObject(ObjectOutputStream oos) throws IOException {
+        // since super class is not Serializable
+        oos.writeLong(id);
+        oos.writeLong(user == null ? -1 : user.getId());
+        oos.writeInt(version);
+        oos.writeInt(changesetId);
+        oos.writeInt(timestamp);
+        oos.defaultWriteObject();
+    }
+
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        // since super class is not Serializable
+        id = ois.readLong();
+        final long userId = ois.readLong();
+        user = userId == -1 ? null : User.getById(userId);
+        version = ois.readInt();
+        changesetId = ois.readInt();
+        timestamp = ois.readInt();
+        ois.defaultReadObject();
+    }
 }
