Hi,

I have 3 beans: Item, ItemGroup, UnitOfMeasure.
Item has a foreign key reference to ItemGroup and a reference to
UnitOfMeasure, but not the other way around.
So this are two "many to one relationships, unidirektional".

I traced the executed SQL's and found out the following:
Executing and ItemHome.create(...) with all fields of item in the
argument list, this SQL's are executed:
"select count(*) from item where id = ?"
"insert into item ( id, description1, ... ) values ( ?, ?, ...)" (all
fields without itemgroup_id and unifofmeasure_id).
After this "select description from item_group where id = ?" is
executed.

OK so far, but now ...

"select id from item where itemgroup_id = ?" is executed and all the
results are fetched (JDBCFindByForeignKeyCommand).

The more items are created the longer it takes to add a new one.
I get an horrible high count of database read calls for only a few data
written.


Frank

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to