Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Cascading and Model Collections #114

Open
sanandrea opened this issue May 6, 2016 · 5 comments
Open

Model Cascading and Model Collections #114

sanandrea opened this issue May 6, 2016 · 5 comments
Labels

Comments

@sanandrea
Copy link

It seems it is not possible to automatically inflate the embedded models (cascade) or collection relationships. At the current status one should manually create the embedded models.
e.g.

//Restaurant.h
@interface Restaurant : LBPersistedModel
@property (nonatomic, copy) NSString* phoneNumber;
@property (nonatomic, strong) Address* locationAddress;
@end

and

//Address.h
@interface Address : LBModel

@property (nonatomic, copy) NSString* city;
@property (nonatomic, copy) NSString* street;
@property (nonatomic, copy) NSString* state;
@property (nonatomic, copy) NSString* zipCode;

@end

When retrieving restaurant from server the address field is a NSDictionary.

@sanandrea
Copy link
Author

sanandrea commented May 6, 2016

@bajtos this other lib gave me some ideas of how to achieve this. Please take a look from line to line.

@bajtos bajtos added the feature label May 10, 2016
@bajtos
Copy link
Contributor

bajtos commented May 10, 2016

Hello @sanandrea, thank you for filling this feature request. I think it's a valid one! Unfortunately we don't have bandwidth to implement it in the near future. Would you like to contribute this feature yourself?

@sanandrea
Copy link
Author

@bajtos I have sort of implemented this, but I would like to know if there is another repo which is used to test the sdk features.

@bajtos
Copy link
Contributor

bajtos commented May 13, 2016

I would like to know if there is another repo which is used to test the sdk features.

Not really, we usually write unit/integration tests to verify new features.

@meashishvaid
Copy link

@sanandrea Can you please suggest me how to implement this ? It would be great if you can provide some help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants