Field not available on this instanceby Group Public on Wednesday April 01 2009 @ 16:02:36 (1/1 Points) |
|
| Tips ↪User Guide ✑ Reply ✓ Stick It ✗ Ditch It ⚐ Tag It |
The 'Field not available on this instance:field' is a common one and can have several different meanings. It is unfortunately not easy, or possible, for Persephone to determine exactly why the field is not available.
Technical Meaning
What this error specifically means is that you have accessed a field on the entity that is currently not set, cannot or has not been loaded, and has no associated default (for new entities).
Search Field Limits
One common occurrence is a field limiter to a search clause. Field limiters mean that not all fields in an entity is loaded.
In this case you need to add your required field to the field limiter list, or remove the limiter.
In general a load operation is not attempted in this case since there is no guarantee the key fields are available, thus load may not be possible.
Invalid Schema Mapper
Your schema file may simply be missing an item in the mapper. That is, the unavailable field has no relation in the mapper.
Note that this is not an invalid scenario, thus Persephone cannot flag it as an error. Fields need not exist in the backing store, or may come from other sources. This is listed here since it is nonetheless a reasonable explanation of the error.
No Default
If you create a new entity only the fields to which you assign and which have defaults are available for reading. This error message can then imply you are attempting to access a field of a new entity which has not yet been set.
Record not Found
Items created with the with syntax are in a special unknown state. If you attempt to access a field on these items which has not been set then you will force Persephone to attempt to load the object. If the object cannot be loaded then the default handling will occur: if there is no default you will then get this error.
If it is possible that an item does not exist and you wish to check this explicitly call the exists function.
Persephone Field not available on this instance
