jrxxjr commented on a change in pull request #760:
URL: https://github.com/apache/tomee/pull/760#discussion_r568787618



##########
File path: examples/xa-datasource/README_es.adoc
##########
@@ -0,0 +1,326 @@
+:index-group: DataSources
+:jbake-type: page
+:jbake-status: status=published
+= Inyeccion del EntityManager
+
+En éste ejemplo y se muestra el uso de `@PersistenceContext` para tener um 
`EntityManager` con un 
+persistence context `EXTENDED`, inyecctado en un bean `@Stateful`. Un bean del 
tipo `@Entity` JPA, se 
+utiliza con el `EntityManager` para crear, inserir e alterar datos en un banco 
de datos.
+
+## La creación de una entidad JPA
+
+La entidad por sí es simple un pojo con la anotación `@Entity`. Nosotros 
creamos una llamada `Movie` Lo que podemos usar para mantener registros de 
películas.
+
+    package org.superbiz.injection.jpa;
+
+    import javax.persistence.Entity;
+    
+    @Entity
+    public class Movie {
+
+        @Id @GeneratedValue
+        private long id;
+
+        private String director;
+        private String title;
+        private int year;
+
+        public Movie() {
+        }
+
+        public long getId() {
+            return id;
+        }
+
+        public void setId(long id) {
+            this.id = id;
+        }
+
+        public Movie(String director, String title, int year) {
+            this.director = director;
+            this.title = title;
+            this.year = year;
+        }
+
+        public String getDirector() {
+            return director;
+        }
+
+        public void setDirector(String director) {
+            this.director = director;
+        }
+
+        public String getTitle() {
+            return title;
+        }
+
+        public void setTitle(String title) {
+            this.title = title;
+        }
+
+        public int getYear() {
+            return year;
+        }
+
+        public void setYear(int year) {
+            this.year = year;
+        }
+    }
+
+## Configure el EntityManager a través de un archivo persistence.xml
+
+La entidad `Movie` encima se puede crear, eliminado, actualizado o eliminado a 
través de un objeto `EntityManager`. Lo `EntityManager` sí mismo es configurado 
a través de un archivo `META-INF/persistence.xml` que se coloca en el mismo jar 
como el entidad `Movie`.

Review comment:
       > como la entidad
   
   It is corrected




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to