We have a JPQL query that is like this:
SELECT COUNT(s.id) FROM SubsidiaryDetail s
JOIN s.accountEntry a
JOIN a.journalEntry j
WHERE j.id = :journalEntryId
AND s.amount <> 0
AND TYPE(s) NOT IN (ARSubsidiaryDetail)
As you can hopefully see SubsidiaryDetail is a supertype;
ARSubsidiaryDetailis a s
I'm getting a metadata validation error and OpenJPA 2.2.1 is attempting to
tell me something I'm sure is helpful, but the message key in question (
join-bad-col) does not appear to have a related message.
Here's the root error I'm getting:
Caused by:
org.apache.openjpa.persistence.ArgumentExcept
On Tue, Oct 25, 2011 at 1:31 PM, Laird Nelson wrote:
> I've got a case where I'm building a query like this:
>
> TypedQuery q = em.createNamedQuery("someQuery",
> SomeInterface.class);
>
> Now, SomeInterface is not the actual entity class--that would be
>
We're using OpenJPA 2.1.0.
I've got a case where I'm building a query like this:
TypedQuery q = em.createNamedQuery("someQuery",
SomeInterface.class);
Now, SomeInterface is not the actual entity class--that would be
SomeInterfaceEntity (not mentioned above, as you'll note). But it is an
interfa
I wanted to verify that this ominous PCEnhancer warning:
3294 weaving WARN [main] openjpa.Enhance - Type "class
> com.foobar.FoobarPropertyEditor" loaded by
> org.apache.openjpa.lib.util.TemporaryClassLoader@5fd1358f has no metadata;
> enhancing as persistence aware. If you intended for "class
The JPA specification is silent on the issue of what should happen if a
@TableGenerator refers to a table with no rows in it.
OpenJPA does the sensible thing, which is to insert a new row, with the
specified pkColumnValue and initialValue in it. Hibernate appears to do
this as well. However, Ecl
I have a @TableGenerator annotation that does not specify a schema:
@javax.persistence.TableGenerator(
name = "Fund",
table = "jpa_sequence",
pkColumnName = "sequence_name",
valueColumnName = "last_value",
pkColumnValue = "Fund",
allocationSize = 500
)
I have a persistence
On Fri, Aug 26, 2011 at 1:49 PM, Laird Nelson wrote:
> OpenJPA tries to read a column called "NAME0", which is not defined
> anywhere.
>
Changing the name of the sequence table column from "NAME" to
"SEQUENCE_NAME" fixed the problem. Bug in OpenJPA, I th
I'm seeing some odd trace output in OpenJPA 2.1.0 when attempting to grab a
value from a sequence table I've set up (via the @TableGeneratorannotation).
I have created a table named ngp.jpa_sequence with two columns: name and
last_value. name is a varchar(100); last_value is a bigint. name is th
http://openjpa.apache.org/builds/apache-openjpa-2.1.1/docs/manual/manual.htmlgives
me a 404. This is the link off the main Documentation page. Thought
someone should know.
Best,
Laird
--
http://about.me/lairdnelson
For a whole host of unimportant reasons, we end up getting this message
output by OpenJPA 2.0.0:
INFO: Found persistence provider "org.hibernate.ejb.HibernatePersistence".
OpenJPA will not be used.
(We run unit tests against all the major JPA providers; hence sometimes
other persistence providers
I have a test suite that runs my JPA entities across all the major JPA
providers.
None of my entities has a schema name in it; I want to keep it that way.
None of my entities are configured in any way other than annotations.
I understand from the JPA specification that if I put in a
element in
Correction: the regression was introduced from 2.0.0-beta3 to 2.0.0.
Best,
Laird
On Mon, Nov 1, 2010 at 3:50 PM, Laird Nelson wrote:
> setInverseRelation, line 469.
>
> In version 2.0.0-beta3, this all worked fine.
>
> In version 2.0.1 any named query I create blows up with a
setInverseRelation, line 469.
In version 2.0.0-beta3, this all worked fine.
In version 2.0.1 any named query I create blows up with a stack like the
following:
FailedObject: SELECT j FROM JournalEntry j WHERE j.status <> :voidedEntry
AND j.effectiveOn >= :beginOn AND j.effectiveOn <= :endOn AND
Interestingly, when I crank the logging up, and when OpenJPA is reporting
its properties, it says:
openjpa.RuntimeUnenhancedClasses: 0
Like I said, I have
...in my persistence.xml. Is something happening here?
Thanks,
Laird
On Wed, May 12, 2010 at 4:00 PM, Laird Nelson wrote
I'm getting an odd NoClassDefFoundError while running unit tests in a
standard Java SE environment. I'm on Java 6 with OpenJPA 2.0.0-beta3.
I have an AbstractType class that is a @MappedSuperclass. It is in one jar
file.
It contains, among other things, an @Id mapping, and a couple of
straightfo
Bug filed: https://issues.apache.org/jira/browse/OPENJPA-1540
Best,
Laird
I'd like to confirm another bug in the InformixDictionary that cropped up
sometime between 1.2.2 and 2.0 beta.
If you ask the InformixDictionary to find a table's imported keys via its
getImportedKeys() method (
http://openjpa.apache.org/builds/latest/docs/javadoc/org/apache/openjpa/jdbc/sql/DBDic
I'm in the process of upgrading my OpenJPA-based tools from OpenJPA 1.2.2 to
2.0. It is extremely painful and full of all sorts of backwards
incompatibilities.
Once I have rebuilt my code to account for the API changes (mostly in the
area of DBIdentifiers), I now find that schemas are being seria
don't know what other properties don't "make it" during
a clone.
Laird
On Wed, Feb 24, 2010 at 3:18 PM, Laird Nelson wrote:
> Hello; JDBCConfigurationImpl, when cloned, drops its passwords on the
> floor.
>
> This did not happen in version 1.2.2.
>
> The pr
Hello; JDBCConfigurationImpl, when cloned, drops its passwords on the floor.
This did not happen in version 1.2.2.
The problem is related to the introduction of the EncryptionProvider in the
2.0 line (and others).
The bug is here: https://issues.apache.org/jira/browse/OPENJPA-1534
This is a sho
I've noticed that none of the DBDictionary instances that ship with OpenJPA
call Column#setAutoAssigned(true), even when it is within their power to do
so.
Is this by design? Does this decision logically lie elsewhere?
Thanks,
Laird
I am baffled at the output of the ReverseMappingTool in OpenJPA 1.2.2 when
it comes to datastore identity.
Perhaps I am missing what datastore identity is. I had assumed that a class
conceptually has datastore identity when it has, for example, an
auto-assigned primary key. In such a case I'd ex
Hi; I'm trying to understand the rationale of some of the implementations of
Cloneable in the OpenJPA codebase.
Take, for example, the clone() method in SchemaGroup.java, and its helper
methods:
public Object clone() {
SchemaGroup clone = newInstance();
clone.copy(this);
Can someone outline for me what the difference is between these two classes
(other than that SchemaGroup is a class and SchemaFactory is an interface)?
To my eyes they are responsible for the same job.
It also seems like a SchemaGenerator should, in all cases, be a
SchemaFactory.
Suppose I'm wri
I'm creating a tool that uses the JDBCConfigurationImpl() class.
I was under the impression that somehow this class is capable of finding the
META-INF/persistence.xml file if it is present on the classpath, thus
setting things like the database user name, the password, the connection
url, and so f
I'm looking at the 1.3.x branch.
In AnnotationPersistenceMappingSerializer.java, line 510, when the
serializer begins its work of recording annotation information for columns,
it does so by consulting the FieldMapping's getMappingInfo().getColumns()
method.
OK; fine; push that on the mental stack
Hello; I asked this question before and got crickets.
What is the best way to customize a ReverseMappingTool run such that for
every table mapped I create a MappedSuperclass that it inherits from?
I am using OpenJPA 1.2.1 and generating annotations, not XML.
So if I have a database table named P
The documentation for ReverseMappingTool says that the -properties command
line option can take a file path or a resource name.
I can get this to work if I give a file path, but not if I give a resource
name.
Assume I'm in the C:\crap directory. If I specify this:
-properties C:\crap\META-INF\o
Perhaps it's just me, but I noticed that all of a sudden dependencies like
commons-lang and serp are not being pulled down when I depend on
openjpa (I cleaned my local repository of OpenJPA
artifacts, and after rebuilding, my build fails, saying that it cannot find
classes that would be present if
Where in the customize(ClassMapping) method of ReverseCustomizer would I set
something that would let the code generators downstream know that they
should generate mapped superclasses instead of entities?
Would I install a different ClassStrategy on the mapping?
Thanks,
Laird
On Thu, Oct 22, 2009 at 10:33 AM, Laird Nelson wrote:
> Before I begin the long, slow process of understanding these hundreds of
> methods, does anyone know if at customize(FieldMapping)-time I have access
> to:
> * The names of unique indices found so far (I presume yes)
> *
Before I spend a lot of time going down the wrong path, I thought I'd ask
the (rather silent these days?) users list what the best approach is.
I work for a company that has a 30 year old database that chose for all
sorts of reasons to have many of its tables defined without primary keys.
Of any k
I was unable to figure out from the documentation here () how to turn off
the generation of the orm.xml file.
I don't actually care, but there seems to be a bug in the tool. If I run
the mapper twice, it appears that the orm.xml file's being present on the
second run causes the tool to crash. I'
Is it possible to have a ReverseCustomizer generate two classes?
Specifically, for my day job this time, I'm required to generate a
@MappedSuperclass and an empty JPA entity skeleton that extends it. I would
love it if we could make use of an existing tool--like OpenJPA's
ReverseMappingTool--to d
I have altered the Maven project locally to use Hibernate instead and it
runs the test case with no problems in exactly the way that I would expect.
I'll try it with EclipseLink next. If that succeeds as well, I'll file a
bug.
Best,
Laird
On Sat, Oct 3, 2009 at 1:03 PM, Laird Nel
I've attached a simple maven project that demonstrates what might be a bug
in the way that OpenJPA handles cascading. However I freely admit of the
strong possibility that instead I'm just being stupid. That's why I'm
coming to the user list first.
Please find attached a JPA project that describ
On a field marked @OneToMany(/*...*/ cascade = CascadeType.ALL), I am
getting this error at persist() time:
org.apache.openjpa.persistence.ArgumentException: Encountered new object in
persistent field "blox.party.jpa.PartyEntity.postalAddresses" during attach. However, this
field does not allow
I have a legacy mapping question.
I have a table called id_rec (this is from a 30 year old database). It
stores, basically, a row for just about every single thing in the system.
I have another table called profile_rec. It stores, roughly, person-related
data, and has a foreign key back to the
I have an entity, E2, that contains a many-to-one relationship with E1 like
this:
// assume E1's primary key column is x
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "x", referencedColumnName = "x", insertable = false,
updatable = false)
private E1 e1;
Then in E2 I also have a field like
Hello, I'm encountering this bug, but with a different stack than the one
reported in https://cwiki.apache.org/jira/browse/OPENJPA-1001.
I'm using OpenJPA 1.3.0-SNAPSHOT and am accessing it through OpenEJB. I
will attempt to reproduce this bug with a simpler test case than the one I'm
currently r
Hello, folks; OpenJPA has impressed me so far for thinking in most cases
waaay ahead of the curve. I'm hoping that perhaps this use case is handled
natively.
I am mapping a 30-year-old relational schema by hand (since it has no
foreign key or primary key information).
One of the cases I've run a
Is it possible to define a non-unique index in OpenJPA? Hibernate offers
the @Index annotation to do this as part of its DDL generation machinery.
My apologies if this was mentioned; I didn't see it in
http://openjpa.apache.org/builds/latest/docs/manual/manual.html.
Thanks,
Laird
One more bug confirmation for today: when generating DDL, I am noticing that
OpenJPA does not match the length or type of a JoinColumn to its referenced
column.
That is, suppose the referenced column is defined like this:
@Column(name = "title", length = 4, columnDefinition = "CHAR(4)")
...and in
I wanted to confirm this bug here before I recorded it.
If I have two columns in my entity that are both marked @Column( ... unique
= true), then the DDL generation machinery of OpenJPA attempts to create two
unique constraints, one for each column--so far so good--but with the same
constraint nam
Hello. I've found that OpenJPA needs me to list my @Embeddable classes in
persistence.xml as well as my @Entity classes. This is not needed by
Hibernate or EclipseLink. I couldn't find a relevant section of the
specification that addresses this. Is this a bug or just a minor
annoyance? I'm try
On Sun, Apr 19, 2009 at 3:41 AM, Paul Copeland (via Nabble) <
ml-user+196740-2043936...@n2.nabble.com
> wrote:
> I noticed that |GenerationType.SEQUENCE also uses that table (with
> Postgres provider). Maybe you have one of those on some Entity.|
>
Nope; I sure do not. :-(
Best,
Laird
47 matches
Mail list logo