mogenerator doesn't generate any entities even though datamodel contains entities. Reports "No entities found in model. No files will be generated."
Asked Answered
C

1

6

I'm trying to get mogenerator (1.26 latest) to generate some boiler plate classes from a core data model (xcdatamodel) and it reports:

No entities found in model. No files will be generated.
(model description: (<NSManagedObjectModel: 0x10012e410>) isEditable 1, entities {
}, fetch request templates {
})

Even though the contents of the xcdatamodel clearly exist

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<model name="" userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1487" systemVersion="11E53" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic">
    <entity name="Chair" representedClassName="Chair" syncable="YES">
        <attribute name="name" attributeType="String" maxValueString="50" syncable="YES"/>
    </entity>
...

What am I doing wrong?

I am using Xcode 4.4.1 and mogenerator 1.26

Cowell answered 3/9, 2012 at 8:4 Comment(0)
A
10

This is a quote from http://raptureinvenice.com/getting-started-with-mogenerator/

When you create entities in your data model, be sure to populate the “Class” field with the same name as the entity.

So what you have to do is:

  • Open your data model
  • Select your entity
  • In the right panel, select the Data Model Inspector (3rd one)
  • Edit the "Class" field with the same name as the "Name" field
Assistance answered 23/3, 2013 at 16:0 Comment(1)
Nice one this just helped me end about 3 hours of frustrationPostpaid

© 2022 - 2024 — McMap. All rights reserved.