Foreign Key Constraint Fails

I am getting "SQLException: Cannot add or update a child row: a foreign key constrant fails". And I have no clue why. I am using Hibernate3. If anyone can glance at this and let me know if they see anything that stands out, it would be much appreciated. Thanks. Below are relavent files:

Can you turn on logging and get the SQL statement that is being sent to the database? Which database, because you could probebly try running the exact statement directly to the database as gett a more specific reason, depending on database.

Originally posted by Mark Spritzler: Can you turn on logging and get the SQL statement that is being sent to the database? Which database, because you could probebly try running the exact statement directly to the database as gett a more specific reason, depending on database.

Originally posted by Gregg Bolinger: Ok, everyone can slap me in the head. It was failing because I was inserting a value for image_id and the t_image table didn't have any data yet. Ugh! It's been a long week. Thanks for the help.

I like the SQL statement with the ? marks, I meant the actual SQL statement executed. But anyway, I was leaning towards the Image, but I think the key is how you define certain relationships. Isn't there a difference between composite and association relationships, and what would automatically create records in the child tables for you if it doesn't exist. Kind of like walking the relationships.