Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #4280
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!gh5g2000vbb.googlegroups.com!not-for-mail |
|---|---|
| From | Biagio <software@notario.it> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Hibernate, iReport and annotation |
| Date | Thu, 19 May 2011 00:01:37 -0700 (PDT) |
| Organization | http://groups.google.com |
| Lines | 45 |
| Message-ID | <1a15b8f2-ecb9-40b1-97f3-5a9bbf62c82e@gh5g2000vbb.googlegroups.com> (permalink) |
| NNTP-Posting-Host | 82.90.14.75 |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Trace | posting.google.com 1305788497 26574 127.0.0.1 (19 May 2011 07:01:37 GMT) |
| X-Complaints-To | groups-abuse@google.com |
| NNTP-Posting-Date | Thu, 19 May 2011 07:01:37 +0000 (UTC) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | gh5g2000vbb.googlegroups.com; posting-host=82.90.14.75; posting-account=OQQYuQoAAAAuEoPRPptltfsl9vhbcY_y |
| User-Agent | G2/1.0 |
| X-HTTP-UserAgent | Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1,gzip(gfe) |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:4280 |
Show key headers only | View raw
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
Back to comp.lang.java.programmer | Previous | Next | Find similar
Hibernate, iReport and annotation Biagio <software@notario.it> - 2011-05-19 00:01 -0700
csiph-web