Hiding Relations in Sub-Entities

I have an Entity called TDocuments.
It is used for saving Images for example.

Many other Entities are referencing TDocuments, and TDocuments provides the corresponding Many-Value-Association, because it is needed for Aurelius.

For XData it is not necessary.
So I could just remove them using XDataExcludePropertyAttribute.

But I do not want to remove them accessing TDocuments directly.

So the Endpoints for TDocuments should show the Many-Valued Associations, while other Endpoints, that have an Image should not go deeper in TDocuments.

How can I handle this?

Shouldn't you just add XDataExcludePropertyAttribute to the TDocuments property of your associations? If not, maybe I didn't understand what you need and I'd ask you to provide more detailed code so I can understand it better.

Also note ManyValuedAssociation associations are never required. You just need the Association ones.

for example:

TEntity  = class
...
 FImage: proxy<TDocuments>;
...

TEntity2 = class
...
 FImage: proxy<TDocuments>;
...

TDocuments = class
...
 FEntities: proxy<TList<TEntity>>;
 FEntities2: proxy<TList<TEntity2>>;

Accessing TEntity or TEntity2 I'd like to see FImage without getting TDocuments.FEntities and TDocuments.FEntities2...
This would work by Adding XDataExcludePropertyAttribute to TDocuments.FEntities and TDocuments.FEntities2.

But Accessing TDocuments, I'd like to see FEntities and FEntities2.
This would not work, if XDataExcludePropertyAttribute is added...

So, I'd like to Disable Fields / Properties for Subselected Entities.

That is not possible with automatic CRUD endpoints.
In this case, you can simply implement a service operation that return specific DTO objects with the structure you want.