← Back to list

View Entities:

A Vital Upgrade for Versatile Data Views

Martin Leppen in Mendix Community · 2025-12-19 13:40 · 52 claps · 3.6 min read
#mendix #low-code #views #tips #front-end-development
Open on Medium ↗

View Entities: A Vital Upgrade for Versatile Data Views

View Entities: A Vital Upgrade for Versatile Data Views

View Entities:

A Vital Upgrade for Versatile Data Views

Since Mendix 10.19, developers have access to a powerful new feature in Studio Pro: View Entities. If you’ve ever struggled with combining data from multiple entities or optimizing performance for large datasets, this is your chance to simplify and accelerate your applications.

In this blog, we’ll explore what View Entities are, why they are a very interesting new feature in Mendix, and how you can start using them effectively.

What Are View Entities?

A View Entity is a read-only entity defined by an OQL (Object Query Language) query. It allows you to combine and/or aggregate data from multiple entities without creating non-persistable helper objects (Non-Persistable Entities, or NPEs). Each time you retrieve a View Entity, the data is fetched directly from the database — no caching, no unnecessary memory usage.

Beyond simple data retrieval, View Entities are perfect for building dashboards. By grouping and aggregating data at the database level, you can create powerful visualizations that provide instant insights. Instead of relying on complex microflows or multiple queries, a single View Entity can deliver an overview of important metrics. This makes it easier to design dashboards that are both quick in retrieving data and also user-friendly, by giving stakeholders a clear overview in just one glance.

Key characteristics:

  • Similar to SQL Database Views, but Mendix-native via OQL.
  • Supports associations and access rules like regular entities.
  • Perfect for widgets such as data grids and list views.

Why Use View Entities?

Performance is the game-changer. We ran a series of simple tests to compare View Entities with traditional approaches using NPEs. The goal was to measure speed and efficiency when retrieving data from different scenarios.

Our test setup:

  • Scenario 1: A single entity with 1,100 records and four attributes, of which only two were needed.
  • Scenario 2: A union of three similar entities totaling 3,266 records, again retrieving only two attributes.
  • Scenario 3: Three entities including one join entity, totaling 9,900 records, where all attributes were required.

The results were striking:

  • Scenario 1: View Entities were 3.4x faster than microflows with NPEs.
  • Scenario 2: Again, 3.4x faster.
  • Scenario 3: A massive 24.6x faster!

By executing queries at the database level and skipping object instantiation, View Entities deliver speed and efficiency that traditional NPE-based solutions simply can’t match.

Best Practices for Optimal Performance

  1. Retrieve only what you need — limit attributes in your OQL query.
  2. Optimize your OQL — document filters and parameters for maintainability.
  3. Index smartly — focus on columns used in WHERE, JOIN, and ORDER BY.
  4. Use pagination — avoid loading thousands of records at once.

How Do View Entities Compare to Existing Concepts?

  • Database Views: Similar concept, but View Entities are Mendix-native and provide real-time feedback.
  • Datasets: Also OQL-based, but less user-friendly and tied to microflows.
  • XPath: Converted to OQL under the hood, but writing OQL directly gives you fine-grained control.

Security and Access Control

View Entities have independent security settings, separate from the original entities. You can even place them in dedicated modules for isolation. Write permissions are limited: changes must go through microflows since View Entities don’t exist in the database. Be cautious — weak access rules on a View Entity can expose sensitive data.

Real-World Examples

  • Sales Dashboards: Aggregate orders, revenue, and customer data into a single View Entity for instant KPI visualization without heavy microflows.
  • Inventory Overview: Combine stock levels from multiple warehouses into one consolidated view for real-time availability checks.
  • Customer Insights: Merge customer profiles with recent transactions and support tickets to create a 360° view for account managers.
  • Project Tracking: Group tasks, milestones, and resource allocations into a single dashboard entity for project health monitoring.
  • Financial Reporting: Pull data from invoices, payments, and budgets into one View Entity for monthly or quarterly reporting.

Conclusion

View Entities are a must-try for Mendix developers dealing with complex data scenarios. They offer speed, flexibility, and maintainability — provided you follow best practices. And here’s another reason to start experimenting: in Mendix 11, Maia can assist you in crafting OQL queries, making it even easier to build efficient and powerful View Entities. So dive in, leverage OQL, and unlock the full potential of your Mendix apps.

If you have any questions or ideas about View Entity use, feel free to contact me!

Read more

[embed]View Entities Introduction A view entity represents a dynamic set of data retrieved using a stored OQL query and can be used…docs.mendix.com

[embed]OQL Introduction The Mendix Object Query Language (OQL) is a relational query language inspired by SQL. The major advantage…docs.mendix.com

From the Publisher -

Inspired by this article to bring your ideas to life with Mendix? Sign up for a free account! You’ll get instant access to the Mendix Academy, where you can start building your skills.

For more articles like this one, visit our Medium page. And you can find a wealth of instructional videos on our community YouTube page.

Speaking of our community, join us in our Slack community channel. We’d love to hear your ideas and insights!


메타데이터
post_id
660df77e07e9
slug
view-entities-a-vital-upgrade-for-versatile-data-views-660df77e07e9
url
https://medium.com/mendix/view-entities-a-vital-upgrade-for-versatile-data-views-660df77e07e9
canonical_url
https://medium.com/mendix/view-entities-a-vital-upgrade-for-versatile-data-views-660df77e07e9
author_url
https://medium.com/@m.leppen
status
ok
fetched_at
2026-07-09 17:36:58