Hi Fernando,
Both AMF0 and AMF3 can contain references to objects so if the participants of a project were rendered individually, the project object would only be rendered once and then references would be made to it (2 bytes usually).
Does that help?
On 2 Aug 2008, at 00:35, Fernando Correia wrote:
If I have two Google App Engine model objects like these:
class Project(db.Model):
name = db.StringProperty()
class ProjectParticipant(db.Model):
project = db.ReferenceProperty(Project, collection_name='participants')
name = db.StringProperty()
When I return an instance of ProjectParticipant from the GAE service,
an instance of the Project is embedded. That may not be very
efficient. If I have 100 participants in a project, the project's data
will be serialized 100 times...
I'd rather have only the Project's key be serialized. Is there an
option for this in PyAMF? Or is the best strategy to use a Data
Transfer Object and copy the data from the model object to the DTO and
return the DTO?
_______________________________________________
PyAMF users mailing list -
users@...http://lists.pyamf.org/mailman/listinfo/users
_______________________________________________
PyAMF users mailing list -
users@...
http://lists.pyamf.org/mailman/listinfo/users