Skip Headers

# Object-Level Modify Queries and Privately Owned Parts

Previous

Next

When you execute a create or update object `DatabaseQuery`, it writes both the object and its privately owned parts to the database by default. To create a query that does not update privately owned parts, use the `DatabaseQuery` method `dontCascadeParts`. Use this method to do the following:

- Increase performance when you know that only the object's direct attributes have changed.

- Manually resolve referential integrity dependencies when you write large groups of new, independent objects.

  Note: Because the unit of work resolves referential integrity internally, this method is not required if you use the unit of work to write to the data source. For more information, see "Understanding TopLink Transactions".