Create tree field with pk in dims resource

Fix #242.

This fixes the case where calls to cached methods would fail during cache key construction because the pk was missing.

Signed-off-by: Don Naegely <naegelyd@gmail.com>