Further to this topic of inverse relationships, what happens if I sync and 
get a new TFField object coming in that should be attached to my TFForm 
object's fields array? Will that just automatically happen? I may need to 
add an observer on my *fields* array to fire off any KVO notifications in 
order to update my UI with the new field(s) from the sync.

On Tuesday, June 9, 2015 at 12:57:05 PM UTC-6, Brendan Duddridge wrote:
>
> Hi,
>
> Perhaps I'm missing something, but I'm following the example here for 
> creating inverse relationships:
>
> https://github.com/couchbase/couchbase-lite-ios/issues/606
>
> I've got a similar model:
>
> // in interface file of TFForm class
>
> @property (nonatomic, strong) NSArray *fields;
>
> // in implementation file of TFForm class
>
> @dynamic fields;
>
> + (Class)fieldsItemClass {
>  return [TFField class]; 
> } 
>
> + (NSString *)fieldsInverseRelation { 
>  return @"form"; 
> }
>
>
> Where TFField has a "form" property which is of type TFForm.
>
> When I access a TFForm instance and try to log the "fields" property, I 
> get null back. Should it automatically create a view and a query for that? 
> Or do I have to do it all manually by creating my own view and query?
>
> I see your example has "albums" as a read-only property. Not sure how you 
> would add an album to an artist if the property is read-only though.
>
> Thanks,
>
> Brendan
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/640056d1-7455-4b7f-8c98-8eee959885d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to