jpa autocompletion/suggestions not working

Hi,


When I try to create a query jpa / hibernate autocomplete does not work and no other suggestions. When I press ctrl + space in query nothing happens.
Something was changed or why it does not work? I have tested several versions of EAP and work it in no.

In Intellij 11 everything works fine.

regards and thanks!

0
7 comments

Hi.

Works for me.
1. Where do you try it? In the editor or in the console? What is the file type, if the editor?
2. Do you see Persistence tool window? Are your classes shown in that window under proper session factory node?

Thanks,
Alexander.

0
Avatar
Permanently deleted user

Hi,

all tools working fine. But not in my java service class.

Sample Class:

public class InventoryService implements InventoryServiceLocal {

    @PersistenceContext(unitName = "MyPU")
    private EntityManager em;

    @Override
    public List<Inventory> getInventoryByEmployee(Employee employee) {
        return em.createQuery("from Inventory i where i.<cursor here and press strg+space>", Inventory.class).setParameter("e_id", employee.getId()).getResultList();
    }


}

Greetings

- i updated database tables
- i use jpa/hibernate on postgres db.
0

Am I correct that you have some string literal inside a java class, and this string literal is actually a QL expression, and now completion has stopped to work inside it?

Please, check that QL injection is tuned for this literal. E.g. invoke Alt+Enter menu inside the QL code: do you see "Edit QL fragment" or similar menu item?

Thanks,
Alexander.

1

Sorry, for some reason I didn't see your code sample. Will try to reproduce.

0

I've got a supposition. Please open Persistence tool window. Find your MyPU unit item. Context menu / Assign Data Sources. It opens a dialog. Is the right data source assigned there?

Regards,
Alexander.

0
Avatar
Permanently deleted user

Hi,
yes datasource is assigned.

I imported my project from Intellij 11.
With Intellij11 everything is going great.

regards and thanks!

0

Got it. Thanks a lot, you've helped to find an issue that seems to be unknown for us. Please, watch: http://youtrack.jetbrains.com/issue/IDEA-92682

Regards,
Alexander.

0

Please sign in to leave a comment.