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

Autocompletion of mapped superclasses for repositories doesn't work #200

Open
Koc opened this issue Dec 19, 2013 · 9 comments
Open

Autocompletion of mapped superclasses for repositories doesn't work #200

Koc opened this issue Dec 19, 2013 · 9 comments
Labels

Comments

@Koc
Copy link
Contributor

Koc commented Dec 19, 2013

$this->getDoctrine()->getManager()->getRepository('MetalCountersBundle:[ctrl+space]'); // suggest only real entities, no any mappedsuperclass found

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/inheritance-mapping.html#mapped-superclasses

@Haehnchen
Copy link
Owner

so this one is not visible?

getRepository('Bundle:EntitySubClass')

@Koc
Copy link
Contributor Author

Koc commented Jan 16, 2014

Entity sublcasses are visible, mapped superclass is not visible.

@tiger-seo
Copy link

+1 here
$repo = $this->getDoctrine()->getManager()->getRepository(Twitter::class);
and $repo is Doctrine\Common\Persistence\ObjectRepository
but if $repo = $this->getDoctrine()->getManager()->getRepository(BaseTwitter::class);
then $repo is MyProject\MyBundle\Repository\TwitterRepository

class signature:
class Twitter extends BaseTwitter

mapping:

MyProject\MyBundle\Entity\BaseTwitter:
    type: mappedSuperclass
    repositoryClass: MyProject\MyBundle\Repository\TwitterRepository

@Haehnchen
Copy link
Owner

ref/dup #346

@Koc
Copy link
Contributor Author

Koc commented Feb 25, 2015

/**
 * @ORM\MappedSuperclass(repositoryClass="Metal\NewsletterBundle\Repository\SubscriptionCategoryRepository")
 */
abstract class SubscriptionCategory

Also value for repositoryClass isn't autosuggested and not clickable

@cmfcmf
Copy link

cmfcmf commented Dec 26, 2015

👍 Having the exact same problems with my entities.

@dewos
Copy link

dewos commented Sep 28, 2016

@Haehnchen I don't want to rush things but, since some years have passed, any update about this one? At work we use MappedSuperclass and Embedded everywhere, nowdays :)

@Haehnchen
Copy link
Owner

Haehnchen commented Sep 29, 2016

@dewos prioritize your most painful issues; what you need first? :)

my todos:

@Haehnchen Haehnchen added the todo label Sep 29, 2016
@dewos
Copy link

dewos commented Sep 30, 2016

hahhah @Haehnchen, ok then, here we come the "Top 3 most painful Issues 2016 at work (real life)". Warning, dragon ahead! :)

Position THREE: Better Twig autocomplete. (Would be nice)
[Twig] No autocomplete in nested for-loop #576

Position TWO: Better doctrine QB autocomplete. (Painful)

  1. In some cases Object::class notation does not work at all. For example for custom joins like $qb->join(Object::class, 'g', 'WITH', 'u.status = ?1'), or ->from(Object::class, 'g')
  2. Embeddable [Doctrine] Add completion for "Embeddables" of 2.5 #471

Position ONE, the KING: Better Doctrine Refactoring. (Very Painful)

  1. Refactoring a class name doesn't change the @ ManyToOne("targetEntity=xxx") (and similar) in Doctrine mapping annotations.
  2. Refactoring a mapped field in entity doesn't change the field name referenced in the query builder.

Honorable mention:
No static inspection\warning on "not imported (use)" annotation with "AS" (like @Assert\FooBarNotHere).

Anyway, without your plugin everything would be much worse, so... no pressure here 👍
@Haehnchen I'm also a Java dev, I hope to find some time sooner or later for learning the IDEA ecosystem and help you out.

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

5 participants