About Metamodel



... Fixed a NullPointerException  in metamodel with embedded ID ( issue #43 ). Fixed an error ... bug in using JOIN FETCH with DISTINCT. Fixed Metamodel API's getTypeId  method to support single ID field . ...


Compare old and new schema

Hello, I have an old database file with important data. Over time, I have modified some of the entity classes but did not keep track of the changes. Some fields may have been renamed or removed, some classes may have been renamed or changed package. Is there a way for me to check what "format" the entity classes have in the old database file and compare that with the new classes definitions?   Thanks, farid ... "old" db without entity classes in the classpath but the metamodel is empty. How does your explorer get to metamodel? Thanks, Farid ...


JBOSS AS7 7.1.1 - Entity not persisted and createNamedQuery fire exception

I'm trying to have the guestbook example running in the following environment: jboss as 7.1.1 final oracle jdk 1.7.0_04 maven 3.0.4 objectdb 2.4.0_04 installed as a module of jboss No IDE is used for building the Guestbook.war only maven.   My GuestDAO code is as follows: ... ( ) ;   javax. persistence . metamodel . ManagedType<Guest> type = em. getMetamodel ( ...


Issue with Casting / Joins

Hi I can't seem to find my way out of this. Basically what I have is something like: ... cannot access it using criteria api.. I can also not use metamodel because it is not available for me at that point.. so what am I doing ...



Create and add a query root corresponding to the given entity, forming a cartesian product with any existing roots.(Method of javax.persistence.criteria.AbstractQuery)


JPA CriteriaQuery -- Iterate Expression<List<Object>>

Hi, I am new to  JPA and in particular the CriteriaQuery API. I have a simple CriteriaQuery where I pattern match a simple search String against field entires in a Person entity... i.e. the searchString is always decorated with %searchString%.  The Person object can contain many Record objects. I would like to update my query below to include a similar 'like' pattern match for each applicable field (String) of each element of the List of Records (see pseudo code).  ... List of Records (see pseudo code).  //using MetaModel Expression<List<Records>> records = root. get ...



The CriteriaQuery interface defines functionality that is specific to top-level queries.(Interface of JPA)



The AbstractQuery interface defines functionality that is common to both top-level queries and subqueries.(Interface of JPA)



The StaticMetamodel annotation specifies that the class is a metamodel class that represents the entity, mapped superclass, or embeddable class designated by the value element.(Annotation of JPA)


First persist takes long time

We detected that the first Persist() of an entity take much longer than all subsequent calls. We have a small example (see Appendix) which outputs the following times: ... empty odb file (e.g. by accessing the types using the JPA Metamodel API) and then you can duplicate that empty odb file (with the types) ...