Id vs System.owner

1) Wat is the difference between the following two expressions? 2) And which one is best suited to write an XPath constraint so that the user can only edit (write) his own attributes? [id = '[%CurrentUser%]']  [System.owner='[%CurrentUser%]'] Final questions: 1) What is the 'id', where can I find it in the Modeller (is it 'SessionId'?)?  2) And same question for '(System.)owner'?    Thanks! Joris
2 answers


The difference between the 2 is that the first expression will only return results when you are querying Administration.Account or specializations of that entity.  The second will return all objects (querying any entity) that were created by the current user. 

You won't find id in the Modeler - it is the representation of an object that can be used in XPath constraints.

You won't see System.Owner in the domain model (although to use it for an entity, you must check the checkbox indicating you want it stored for an entity).  You will see it when you are building XPath constraints as an available object to use.

Hope that helps,



Let's add knowlegde like this to the Mendix docs:

I have made a start with it, please feel free to improve me suggestions: