这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Will Not Allow a CDQ Model named Product #20

@austinseraphin

Description

@austinseraphin

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";
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions