Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 224
BlueFish Avatar asked Sep 03 '12 08:09

BlueFish


1 Answers

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
like image 103
Arnaud Avatar answered Sep 22 '22 13:09

Arnaud