Reverse Mapping PostgresDB - unique constraints not generated.

2011-05-19 Thread Boblitz John
Hello, I am attempted to reverse map a PostgresDB, and, after some initial problems I suceeded in generating a schema with the SchemaTool and then the annotated classes via the ReverseMappingTool. I am generally very happy with the results. However, none of my unique constraints are annotate

Persisting a List

2011-05-19 Thread Jason Ferguson
I'm using this method in a Repository class and was wondering if someone could do a quick sanity check on it: @Transactional public void persistList(List objectList) throws RepositoryException { EntityManager em = entityManagerFactory.createEntityManager(); try {

Re: Query cache eviction problem with InheritanceType.TABLE_PER_CLASS

2011-05-19 Thread Kevin Sutter
HI Oleg, Can you post the specific exception or error condition you are referring to? OpenJPA utilizes several caches. It sounds like you might be referring to the QuerySQLCache not being able to cache the generated SQL. This is different from the QueryCache which caches the results of various Q

Re: Criteria API; AND 1 = 1 in WHERE Clause

2011-05-19 Thread Kevin Sutter
Hi Georg, When creating dynamic SQL, it's a common practice to use the "1 = 1" in the WHERE clause to know that there is always at least one conditional. This way, you can automatically use the "AND" with the other conditions since the "1 = 1" always evaluates to True. Normally, this "1 = 1" gets

Re: v2.1.0 TYPE() function bug

2011-05-19 Thread Kevin Sutter
Hi Brian, The best thing to do is to open a JIRA [1] for an issue like this. Providing a junit test case is an extra bonus that will help a developer narrow in on the problem immediately, and we can add it to our regression bucket to prevent this from happening again. Thanks! Kevin [1] http://o

Query cache eviction problem with InheritanceType.TABLE_PER_CLASS

2011-05-19 Thread LYALIKOV, OLEG (OLEG)** CTR **
Hello, I'm using openjpa-2.0.0 and have some base class @Entity @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public abstract class Base { ... } and also some inheritors @Entity @Inheritance(strategy = InheritanceType.JOINED) public class A extends Base { ... } @Entity @Inheritance(s

ManyToOne "cannot be mapped without stringifying the oid of the related object to a string column." in a unidirectional relationship.

2011-05-19 Thread Krzysztof
Hello, I have stumbled at the problem I thought was solved some time ago: with a ManyToOne field which references class with a 2nd level composite id (its id includes classId of other class in the class graph) I got following exception during schema creation: org.apache.openjpa.persistence.Argu