Commit 3936da00 by Patryk Czarnik

UK

parent 4d1d2894
package przyklady;
import hr.model.Country;
import jakarta.persistence.EntityManager;
import jakarta.persistence.EntityManagerFactory;
import jakarta.persistence.Persistence;
......@@ -13,8 +14,9 @@ public class P0_OdczytajKraj {
EntityManager em = emf.createEntityManager();
System.out.println("Jest EM: " + em);
Country country = em.find(Country.class, "UK");
System.out.println(country);
System.out.println("Kod kraju: " + country.getCountryId() + ", nazwa: " + country.getCountryName());
System.out.println("Zamykamy...");
em.close();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment