fixed bug in data object generation foreign key lookup