Contributions 1 min read

# New feature: DataObject::getBy system properties

We've built another Pimcore feature! Check out how Tomislav, our backend developer, created an entire new functionality.

Last updated on 29 August, 2025

## Key takeaways

1. Pimcore's getBy methods previously did not support some system properties, so fetching an object's children required building a separate listing.
2. Factory's contribution checks whether a getBy call refers to a system property and handles it like any other object property.
3. With this feature, developers can call $object->getByParentId($parentId) to get all children of an object directly.

## **What was the issue?**

There are system variables that weren’t supported by any getBy method. That means that if anyone wanted to get for example a child of some object, he should create a new listing, add the condition for the parent and then get the objects from the listing.

## **How did you solve it?**

Pimcore already had getByProperty for every property on an object and for some system predefined properties. Because I didn’t want to change any Pimcore functionality, the code is added after the old Pimcore code. Now instead of throwing an exception, first is checked if getBySystemProperty is actually a system property and if it is it does the same logic as with any other object property.

## **Why is this fix important?**

For example, let’s say that a programmer wants to get all objects that are children of some other objects. He could create a new listing and set the condition and then get it from there, or he could create some service that needs to get injected into his class so he can reuse his getByParentId method. Now all he needs to do is call $object->getByParentId($parentId) to get all children of that object.

## **How does it feel to contribute to a platform such as Pimcore?**

For now, most likely I will stick to providing pull requests for bug fixes or some minor improvements. Besides that, probably some articles about some of the Pimcore functionality that I see are interesting and useful. I wasn’t thinking about courses but now that you ask, yea maybe even some courses for beginners that want to start with Pimcore and don’t know how or where.

And if you want to check out this [pull request](https://github.com/pimcore/pimcore/pull/10709), just follow the link!

## Related

[Contributions **Localized error pages – new feature** Check out one of our biggest pull request that's now officially become a new Pimcore feature! 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/localized-error-pages) [Contributions **WYSIWYG: char counter and maxChar limit in datatype fix** Check out how one of our Pimcore developers helped improve Pimcore's WYSIWYG editor! 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/wysiwyg-char-counter-datatype-fix) [Contributions **Using localized field – lazy load fix** Check out how we fixed the issue with lazy load when using localized fields in Pimcore! 1 min read](https://factory.dev/pimcore-knowledge-base/contributions/localized-field-lazy-load-fix)

---

Source: https://factory.dev/pimcore-knowledge-base/contributions/new-pimcore-feature-dataobject
