This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi, I am trying to save something into database, but i am getting this error:
What I don't understand is that the values delivery_restriction_id = 62 delivery_type_id = 343 are clearly present from this line:
Batch entry 0 insert into public.del_res_del_type_xref (delivery_restriction_id, delivery_type_id) values (62, 343) was aborted
but why does hibernate complain that key is not present. I look in both tables (delivery_restriction and delivery_type) and the id's are there.
Here's del_res_del_type_xref's script
any ideas?
Reehan Lalkhanwar
Ranch Hand
Joined: Jun 16, 2007
Posts: 106
posted
0
The error only says that delivery_restriction_id = 62 is not present in delivery_restriction table.
Did you check the DB? Did you run the query on delivery_restriction for id=62 and did you get any results?
Ok solved the problem. apparently one of my other hbm files were mapping to this table as well and it didn't like the changes when they came from the original table.
Thanks guys
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Key is not present in table error hibernate