About class

111-120 of 200Refresh
Manual
10

Deleting JPA Entity Objects

transaction, it can be deleted using the remove method: Employee employee = em.find(Employee.class, 1 ... if the argument is not a an instance of an entity class or if it is a detached entity ... can be referenced by a collection field): @Entity class Employee { : @OneToOne
Manual
10

Detached Entity Objects

): @Entity class Employee { : @OneToOne(cascade=CascadeType.DETACH) private Address address; : } In the example above, the Employee entity class contains an address field that references an instance of Address, which is another entity class. Due to the CascadeType.DETACH
Forum
10

Exception after update of indices of Entity class

Hello, I changed the index definition of an entity class from @Index()... to @Indices() and now I ... itself? The stack trace may indicate an issue with an embedded class with no indexes or fields (which maybe had indexes before). Have you changed the indexes of an embedded class? Hello, here are my classes
Forum
10

How prevent post-compile enhancement of non entity classes

.platform.classpath}">
Forum
10

Class fields selection to store

In a class how do I define which are the fields to be stored? (using JDO API) It's using persistence-modifier="persistent" ? If I have a class with 40 fields and I only want to store one of the fields should I do the following? <class name="Car">
Forum
10

LifeCycle Event with Embeddable classes

for embeddable classes, not just for entities? My case looks as follows: @Entity public class Foo { @Id ... Timestamp(System.currentTimeMillis()); }} @Embeddable public class Bar { @Temporal(TemporalType ... class an Entity class though it does not make sense practically. I cannot setModifyDate manually
Forum
10

Restrict by class in query

=:name", Folder.class); return byNameQuery.setParameter("name", folderName).getResultList(); } I would have assumed that the class parameter would cause results to be restricted to only objects of type Folder (I have a class hierarchy in which both Link and Folder are subclasses of a common root
Forum
10

Retrieve data of all entity classes in a single query

I have in an objectdb file 10 Entity Classes with some data in each (Athlete, Trainer, Stadium etc) This is the code I use to retrieve all Managed Types and data for the Athlete class Metamodel ... + " s"; // This works for all classes TypedQuery query = em.createQuery(tmpQuery
Forum
10

Running doctor.jar with entity classes in classhpath

Hi, I am wondering how to populate new entity classes to database file, so that I could add new ... .jar (my entity classes in it) in classpath but it doesn't work (new entities still dont show up in ... steps: Run the Explorer with the new class in the classpath:     java -cp -jar explorer
Forum
10

Weird behaviour with enhanced classes and embedded entities

.Persistence; public class Main {   @Entity   static class MyEntity {     @Id     int    id ... > getEmbeddedEntities(){       return embeddedEntities;     }   }     @Embeddable   static class ... ){       this.embeddedEntities.add(entity);     }   }     @Embeddable   static class