Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings for method collision #16

Closed
zorn opened this issue Mar 24, 2010 · 8 comments
Closed

Warnings for method collision #16

zorn opened this issue Mar 24, 2010 · 8 comments
Labels
Milestone

Comments

@zorn
Copy link

zorn commented Mar 24, 2010

One thing that seems to burn me often is giving one of my Entities an attribute with a name that clashes with the other methods in Cocoa.

It would be cool if mogenerator gave me a warning that although I have an attribute named description the class mogenerator will create will have a method that will collide with NSObject's -description.

I've seen similar issues with -name -type -value and a few others.

@rentzsch
Copy link
Owner

rentzsch commented Jul 1, 2010

This should be in the data modeler, but since mogenerator + Xmo'd is all about picking up Apple slack, I agree we should roll it in. Patches welcome and/or a comprehensive list of such troublesome names.

@rentzsch
Copy link
Owner

rentzsch commented Sep 8, 2011

@rentzsch
Copy link
Owner

Looks like Xcode's gotten smarter since this feature was requested. its data model editor now won't allow attributes with the following names:

  • description
  • hash
  • superclass
  • class
  • self
  • zone
  • isProxy
  • managedObjectContext
  • entity
  • objectID
  • isInserted
  • isUpdated
  • isDeleted
  • isFault
  • retain
  • retainCount
  • release
  • autorelease
  • init
  • copy
  • mutableCopy
  • dealloc
  • and so on (didn't bother trying all the methods in NSObject)

@rentzsch
Copy link
Owner

@zorn #74 says "type" is a problem (as does chockenberry). I can't find anything that suggests "name" or "value" are problematic?

ddrccw pushed a commit to ddrccw/mogenerator that referenced this issue Jan 20, 2014
…riggers Apple's piss-poor private-API-use detector when submitting to the App Store. Closes rentzsch#16.
@drekka
Copy link

drekka commented Sep 15, 2014

Can someone tell me how to suppress the primitive accessors? We don't use them and 1.28 appears to still be generating them.

@apparentsoft
Copy link

While primitiveType and setPrimitiveType are suppressed, setPrimitiveTypeValue and primitiveTypeValue are not. Which creates code that doesn't even compile (since they reference the suppressed methods)

@jhemingw
Copy link

The bizarre thing I'm experiencing on my iOS project, is that of the 15 or so entities I have, primitiveType and setPrimitiveType are only generated for one of the classes! This on version 1.28.

@eytanbiala
Copy link

@rentzsch Is there a way to suppress the primitive accessors, and possibly also some of the other generated code as well?

DaveWoodCom added a commit to DaveWoodCom/mogenerator that referenced this issue Sep 11, 2016
…Is: primitiveValue`, similar to rentzsch#74 and rentzsch#16, so this avoids generating `primativeValue` methods

Wonder if it would be better to amend the main code base similar to this commit?:
rentzsch@cd9809d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants