My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 30: getCollectionX() association should verify field annotations too..
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  eric.bot...@gmail.com
Closed:  Dec 2008


 
Reported by java.ma...@gmail.com, Dec 15, 2008

this query:

EntradaDirecta e = alias(EntradaDirecta.class, "e");
DetalleEntradaDirecta det = alias(e.getDetalles(), "det");
select(e).from(EntradaDirecta.class).as(e).innerJoin(e.getDetalles()).as(det).where(conditions)

throw this exception:

java.lang.IllegalStateException: Not a persistent collection getter (does
not bear OneToMany/ManyToMany) : public java.util.List
net.compulago.almacen.model.EntradaDirecta.getDetalles()
        at
com.google.code.liquidform.internal.PropertyAccessRecordingInvocationHandler.collectionElementType(PropertyAccessRecordingInvocationHandler.java:97)
        at
com.google.code.liquidform.internal.PropertyAccessRecordingInvocationHandler.intercept(PropertyAccessRecordingInvocationHandler.java:59)
        at
net.compulago.almacen.model.EntradaDirecta$$EnhancerByCGLIB$$f4b842a8.getDetalles(<generated>)

I think this is because my JPA annotations for relations @OneToMany
@ManyToOne, etc, are in the fields not in getter methods.

Dec 16, 2008
Project Member #1 eric.bot...@gmail.com
Indeed, your diagnosis is correct.

We need to tackle the whole field annotation problem (see issue #25), but in the 
meantime, we'll add support for your use case (getters available but mapping 
annotation on the field, named after the getter)
Status: Accepted
Owner: eric.bottard
Labels: Milestone-Release1.0
Dec 16, 2008
#2 java.ma...@gmail.com
thanks..
Dec 26, 2008
Project Member #3 Vincent.Cornet@gmail.com
(No comment was entered for this change.)
Status: Fixed

Powered by Google Project Hosting