[ome-devel] findObject problem

august august at develop.ment.org
Mon Dec 4 20:22:06 GMT 2006


Hi All,

I don't know why I haven't really noticed this problem before, but when
you do a findObject query in the database for some type def that doesn't
exist, it causes problems. 

so, to check if something exists in the DB, I first have to wrap the
findObjects in an eval statement.  This seems like overkill to me.  Is
there no way to have findObject return null or something like that so
that these sorts of queries can be handled gracefully?
Or, is there another way to check if the type is defined or not?


example:

I do:  $factory->findObject('@Myattribute', 'image_id' => $image_id );

if the @Myattribute  definition  is not already set in the DB, I get
perl runtime errors.

thanks -august.



More information about the ome-devel mailing list