Martin Bartoš f53e5ebdac
[Docs] Additional datasources support (#42655)
* [Docs] Additional datasources support

Closes #40388

Closes #42263

Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
Signed-off-by: Martin Bartoš <mabartos@redhat.com>

* Rename namedKey to wildcardKey in the code

Signed-off-by: Martin Bartoš <mabartos@redhat.com>

* Clarify the defaults for DB kind

Signed-off-by: Martin Bartoš <mabartos@redhat.com>

* Be more clear about the Named key reference in guide

Signed-off-by: Martin Bartoš <mabartos@redhat.com>

* Vasek's review

Signed-off-by: Martin Bartoš <mabartos@redhat.com>

---------

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Co-authored-by: Václav Muzikář <vaclav@muzikari.cz>
2025-09-27 08:45:12 +00:00

14 lines
739 B
Plaintext

=== Accessing the new entity manager
In order to simply access your data in your {project_name} extension, you can obtain the link:https://jakarta.ee/specifications/persistence/3.2/apidocs/jakarta.persistence/jakarta/persistence/entitymanager[EntityManager] for the additional datasources used in these quickstarts.
It helps you to interact with entities specified for your datasource, as it provides some kind of bridge between your JPA entities and the database.
You can use the new entity manager (for the `user-store` datasource) as follows:
[source,java]
----
EntityManager em = session.getProvider(JpaConnectionProvider.class, "user-store").getEntityManager();
var user = em.find(org.your.extension.UserEntity.class, 123L);
----