Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Try to create entity from classes with class prefixes - #65

Closed
florianbuerger wants to merge 3 commits into
supermarin:masterfrom
florianbuerger:master
Closed

Try to create entity from classes with class prefixes#65
florianbuerger wants to merge 3 commits into
supermarin:masterfrom
florianbuerger:master

Conversation

@florianbuerger

Copy link
Copy Markdown

The entity description fails if the class name doesn't match the entity
name (a common problem with class prefixes)

This change tries to create the entity from the classname stripping the
first two or three letter.

If this doesn't help, an exception is thrown.

The entity description fails if the class name doesn't match the entity
name (a common problem with class prefixes)

This change tries to create the entity from the classname stripping the
first two or three letter.
@supermarin

Copy link
Copy Markdown
Owner

@florianbuerger thanks for the PR.

Honestly, I'm not sure this is the right way of doing things.
There is an +entityName method you can override on your object. What do you think about that?

@florianbuerger

Copy link
Copy Markdown
Author

Yeah, after a little bit of thought I think you are right. There are to many places where something can go wrong, I'll just rename my entity to match the class names or override +entityName

Please don't merge the pull request 😄

@supermarin supermarin closed this Jan 9, 2014
@supermarin

Copy link
Copy Markdown
Owner

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants