While migrating an existing CBL iOS client to CBL 1.1.1, I've run into an 
issue where I need to inject a dependency for the logic that creates a 
custom document ID with multiple components, such as "type:GUID:subtype"

In 1.1.1, we have - [CBLModel modelForDocument:], [CBLModel 
awakeFromInitializer] and -[CBLModel idForNewDocumentInDatabase]. While the 
particular subclass can be used to derive the type component in my 
scenerio, the logic in idForNewDocumentInDatabase needs to know what 
subtype is being requested to derive the last fragment of document ID. This 
was previously passed into the initializer. 

A contrived example would be [[MySubclass alloc] 
initWithNewMyModelInDatabase:aDatabase subtype:@"thumbnail"]; At which 
point, idForNewDocumentInDatabase could reference self.subtype to generate 
the custom document ID. 

Is there a way to inject the subtype dependency to 
idForNewDocumentInDatabase in 1.1.1?

-- 
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/bb191caf-f7af-433a-8fca-530b9a426bd5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to