Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Generic way to test if all the propertiers of an object are null

Question
Mike Dawson · Aug 4, 2016

Generic way to test if all the propertiers of an object are null

I need a generic way to check if all the properties on an object instance are null. Has anyone got some code they could share?

I could of course add a method to each class and pass in all the properties and test them but I'm sure there must be a generic way to do this. A generator method perhaps?

Regards

Mike

#Object Data Model #Caché

Source URL:https://community.intersystems.com/post/generic-way-test-if-all-propertiers-object-are-null