views:

77

answers:

0

I have a quite large object tree structure that I persist with Hibernate. This should have been persisted with the root-node first and then the children and so on. However this was not the way that Hibernate did it, it persisted the child first and than updated the reference column in the child when the parent had been persisted. This is not an optimal way of doing it so I forced the One-To-Many (JoinColum) to be not null (nullable=false).

Now it turns out that everything is even slower, much much slower. I don't understand?!