You are here: Client-Server > Anonymous Classes In Client Server Mode

Anonymous Classes In Client Server Mode

Anonymous classes are used to implement Native Query predicates, Comparators and Evaluations. In this case it is important to remember that in client/server mode they will be marshaled and sent together with the graph of referenced objects to the server. The catch here is that anonymous classes contain a reference to their parent class, meaning that the parent class will be marshalled as well!

This has two issues:

Note that when a native query can be optimized, the anonymous class isn't used, but rather SODA. In such cases this issues don't apply.