Hello

I have a ManyToMany relationship between three entities: Invoice, Product, 
InvoiceProduct, mapped with OneToMany bidirectional.


Entity: Invoice

Attribute: OneToMany InvoiceProduct


Entity: Product

Attribute: OneToMany InvoiceProduct


Entity: InvoiceProduct

Attribute: ManyToOne Invoice

Attribute: ManyToOne Product

Attribute: EmbeddedId InvoiceProductId


Also Invoice has an attribute annotated with @Version.


Now everything works as it should when using pure EJB JPA (Hibernate) with H2 
database. But i get the following exception:


org.hibernate.PropertyAccessException: Could not set field value 
[SHORT_CIRCUIT_INDICATOR] value by reflection : [class 
bo.com.saguapac.eearchitect.InvoiceProductId.invoiceId] setter of 
bo.com.saguapac.eearchitect.InvoiceProductId.invoiceId


 When i add a Repository that extends AbstractEntityRepository for Invoice 
Entity.


Please , any advice would be appreciated.


Note: the environment is JBoss EAP 7, Java 8 update 101, Windows 10. Also if 
you want i can give you the maven project for testing.


bye,

Vladimir Albis Arandia
Telf. 3522323 Int. 568
Desarrollo de Aplicaciones
Gerencia General

Reply via email to