aspose file tools*
The moose likes Object Relational Mapping and the fly likes What does hibernate think is Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "What does hibernate think is "dirty" here?" Watch "What does hibernate think is "dirty" here?" New topic
Author

What does hibernate think is "dirty" here?

Vinnie Jenks
Ranch Hand

Joined: Apr 26, 2004
Posts: 207
I can't select a simple list of objects w/o an update happening for each record in the List...and I can't put my finger on *why* this would be happening.

...the Order mapping:



When I run through the records like so, the updates happen.



Here's the method being called:



I get these queries:



Every call thereafter I get only the query I would have expected...even if I restart tomcat:



However, if I reload the data from production to my dev box and start fresh...the updates happen again!

Also, this all happens within one session and one transaction...nothing gets disconnected.

There's nothing wrong w/ the data so far as I can tell and I'm just stumped...any ideas?

Thanks!
Vinnie Jenks
Ranch Hand

Joined: Apr 26, 2004
Posts: 207
Any ideas? Anyone? I'm seriously crunched for time or I'd just be more patient.

I RTFM, I followed instructions, but this one object is producing unexpected behavior.

I'm pressed for time and Hibernate has always worked good for me in the past...but I have no choice but to rip it out of my DAO and start using something else or just manually mapping the classes to data...which sucks...but I have about 30 min. to decide!

Any clues? Shots in the dark are also welcome!

Thanks!
Vinnie Jenks
Ranch Hand

Joined: Apr 26, 2004
Posts: 207
I FIGURED IT OUT!!

Stupid Netbeans!

I'm using a nightly release of netbeans 5.0 (yeah, go ahead and kick me now)...which has been EXCELLENT up until this little BUG!

Anyhow...the Address1 and Address2 fields were being set to NULL, that's what all the updates were about.

THAT was happening because the parameters were misspelled for those two setters...but either Netbeans and/or the Java compiler didn't catch it and allowed the classes to build that way...so...once I fixed the spelling everything fell into place.

AHHH!! That kept me busy for almost two days!!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does hibernate think is "dirty" here?