martijnwalraven / meteor-ios

Meteor iOS integrates native iOS apps with the Meteor platform (http://www.meteor.com) through DDP
MIT License
740 stars 79 forks source link

Internal Entity Mapping issue #92

Open ShikharQuovantis opened 8 years ago

ShikharQuovantis commented 8 years ago

I am subscribing to a Users publish function from my iOS app. The Entity "Users" is created on my side in CoreData as this:- extension Users {

@NSManaged var createdAt: NSDate?
@NSManaged var profile: UserProfile?

} It contains a userProfile Object for which I have the Entity also created as:- extension UserProfile {

@NSManaged var picture: String?
@NSManaged var credit: NSNumber?
@NSManaged var ziggeoVideoId: String?
@NSManaged var ziggeoVideoUrl: String?
@NSManaged var ziggeoImageUrl: String?
@NSManaged var firstName: String?
@NSManaged var lastName: String?
@NSManaged var type: String?
@NSManaged var code_verified: NSNumber?
@NSManaged var code: NSNumber?
@NSManaged var speciality: String?
@NSManaged var phone: String?
@NSManaged var addressOne: String?
@NSManaged var addressTwo: String?
@NSManaged var city: String?
@NSManaged var address: String?
@NSManaged var country: String?
@NSManaged var state: String?
@NSManaged var dob: String?
@NSManaged var gender: String?
@NSManaged var zipcode: String?
@NSManaged var bio: String?
@NSManaged var approve: NSNumber?
@NSManaged var lat: NSNumber?
@NSManaged var lon: NSNumber?
@NSManaged var profileVideo: String?

}

On subscribing the Users function, the Users entity is getting mapped properly but the UserProfile is not getting mapped automatically as when I am accessing the properties of UserProfile as "profile.firstName", I am getting a nil value. So the rows for the user Entity are getting created but somehow the internal mapping to the UserProfile Entity is not taking place.

So my doubt is that, is that how meteor works or do we have to subscribe for each entity we create on our side???

RonGafni commented 8 years ago

I have also this problem with 'users' and 'user' entity names!!