3.4. Smart Proxies
Prev | Chapter 3. Creating Persistent Classes | Next

## 3.4. Smart Proxies

Kodo JDO takes advantage of the guaranteed unqiueness of `java.util.Set` elements and `java.util.Map` keys to create smart proxies for your persistent set and map fields. Most proxies only track whether or not they have been modified. Smart proxies, however, keep a record of which elements have been added and removed. This record enables the Kodo JDO runtime to make more efficient database updates on these fields.

When designing your persistent classes, keep in mind that you can optimize for Kodo JDO by using fields of type `java.util.Set`, `java.util.TreeSet`, and `java.util.HashSet` for your collections whenever possible. You can also design your own smart proxies to further optimize Kodo JDO for your usage patterns. See the section on custom proxies for details.

Prev | Up | Next
3.3. Auto-Generating Classes from a Schema | Home | Chapter 4. Metadata