Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Will Not Allow a CDQ Model named Product #20

Open
austinseraphin opened this issue Jun 29, 2016 · 1 comment
Open

Will Not Allow a CDQ Model named Product #20

austinseraphin opened this issue Jun 29, 2016 · 1 comment

Comments

@austinseraphin
Copy link

It appears that some sort of conflict happens between PM::IAP and CDQ if a CDQ model named Product exists. To reproduce:
Create a fresh ProMotion app.
Create a CDQ schema and model named Product
Enable the promotion-iap gem by uncommenting it in the Gemfile
Run rake to go into the simulator, and create a product

(main)> product=Product.create(title: "Test product")
=> #NSException:0x110d8ec80

A spec sheds a little more light. This creates a product. It prints the ancestors of class Product before doing so.

  • creates a product[Product, CDQManagedObject, CDQ, CoreDataQueryManagedObjectBase, NSManagedObject, NSObject, Kernel]
    [ERROR: NSException - #NSException:0x10bee56e0]
    NSInternalInconsistencyException: "Product" is not a subclass of NSManagedObject.

And removing PM::IAP causes everything to work.

(main)> product=Product.create(title: "Test product")
=> <Product: 0x10bd5e7d0> (entity: Product; id: 0x10bd9ff20 x-coredata:///Product/t5E48D422-4DA9-4ED2-9768-B4B2EAFB58D02 ; data: {
price = 0;
title = "Test product";
})

@jamonholmgren
Copy link
Member

That's really weird, @austinseraphin . So it's clashing with the PM-iap Product class?

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

No branches or pull requests

2 participants