> - (NSString *)convertToRemoteExpectedType {
> // exclude id , created_at , updated_at
> NSArray *defaultExclusions = [NSArray arrayWithObjects:[self
> getRemoteClassIdName],@"createdAt",@"updatedAt",nil];
> // add the custom exclusions if the object implements the method
> if([self respondsToSelector:@selector(exclusions)])
> defaultExclusions = [defaultExclusions
> arrayByAddingObjectsFromArray:[self exclusions]];
>
> return [self performSelector:[[self class] getRemoteSerializeMethod]
> withObject:defaultExclusions];
> }
This looks like a solid approach to me. I created a ticket on
lighthouse to track this:
Do you think this should affect deserialization as well? Would it make
sense to have two separate methods to handle that? The current code
ignores remote attributes that are not present on the local classes,
perhaps that is sufficient?
Paul, do you use github? If so, if you fork the 1.1 branch and apply
your changes I can pull them in directly.
> Yesterday I pulled in your ObjectiveRecord code to replace
> sqlitepersistentobjects, its working great for me so far. I had to
> make one minor change to get it running but I've also implemented the
> count and countByCritera functions on SQLitePersistenObject are you
> interested in pulling in changes on ObjectiveRecord? If so I'll fork
> ObjectiveSync and add my ObjectiveRecord changes too.
I'm very interested, please fork.
First off, ObjectiveRecord isn't really much a project, it's a fork of
sqlitepersistentobjects that I made to work with the ObjectiveSync
project. They are both very much a work in progress, so
ObjectiveRecord currently lives inside the ObjectiveSync project:
http://github.com/yfactorial/objectivesync/tree/040d622d5a64895ca0ae67352d00e49dc9961a99/external_libs/ObjectiveRecord
Josh
Thanks Paul!