B
Biagio
Hi,
I have a blocking problem, most likely I'm missing something.
I have two tables in my database: "Customers" and "Person"
The two tables are related to the field 'codPerson'.
The table Person has two fields:
codPerson | desPerson
My problem is as follows. Everything works fine when the row in
Customers have a value for field 'codPerson' (not empty or not null).
However, if a customer related field is empty (because optional) shows
me the error.
When I use a list with iReport to read one of the fields in the table
"Person" The application shows
the following error:
net.sf.jasperreports.engine.JRException: Error retrieving field value
from bean: desPerson
This is my code in Customers annotation:
@ ManyToOne ()
@ NotFound (action = NotFoundAction.IGNORE)
@ JoinColumn (name = "codPerson", unique = true, nullable = true,
Insertable = false, updatable = false)
private Person person;
Again, if all the records in the table Customers have field codPerson
valued the query works very fine.
I would like in the query result field 'desReferente' remain empty for
optional value
Now I do not know if I have to change the configuration of Hibernate,
or if I have to manually create the list adding each row.
Can anyone help me?
I'm sorry for my english.
Thanks
Biagio
I have a blocking problem, most likely I'm missing something.
I have two tables in my database: "Customers" and "Person"
The two tables are related to the field 'codPerson'.
The table Person has two fields:
codPerson | desPerson
My problem is as follows. Everything works fine when the row in
Customers have a value for field 'codPerson' (not empty or not null).
However, if a customer related field is empty (because optional) shows
me the error.
When I use a list with iReport to read one of the fields in the table
"Person" The application shows
the following error:
net.sf.jasperreports.engine.JRException: Error retrieving field value
from bean: desPerson
This is my code in Customers annotation:
@ ManyToOne ()
@ NotFound (action = NotFoundAction.IGNORE)
@ JoinColumn (name = "codPerson", unique = true, nullable = true,
Insertable = false, updatable = false)
private Person person;
Again, if all the records in the table Customers have field codPerson
valued the query works very fine.
I would like in the query result field 'desReferente' remain empty for
optional value
Now I do not know if I have to change the configuration of Hibernate,
or if I have to manually create the list adding each row.
Can anyone help me?
I'm sorry for my english.
Thanks
Biagio