Note that there are some explanatory texts on larger screens.

plurals
  1. POUnable to fetch related item from DynamoDB using Core Data
    primarykey
    data
    text
    <p>I have two entities with a one to one relationship between the two. In tests I can create the two entities, join and save them. The data appears in DynamoDB as expected with the appropriate ID's displayed to show the two are related.</p> <p>I then attempt to retrieve the items back. I perform a fetch request for one of the items, which is returned and I can log it's identifier successfully. However, if I attempt to log the identifier of the related entity which I am expecting to have been fetched implicitly I get the following exception:</p> <pre><code>2013-01-17 15:00:13.936 DJ[10995:c07] DynamoDBResponse.m|-[DynamoDBResponse connectionDidFinishLoading:]|62|Response Body: {"__type":"com.amazon.coral.validate#ValidationException","message":"1 validation error detected: Value null at 'key.hashKeyElement' failed to satisfy constraint: Member must not be null"} 2013-01-17 15:00:13.936 DJ[10995:c07] DynamoDBResponse.m|-[DynamoDBResponse connectionDidFinishLoading:]|92|Returned CRC32: 650439770, Calculated CRC32: 650439770 2013-01-17 15:00:13.937 DJ[10995:c07] AmazonRequestDelegate.m|-[AmazonRequestDelegate request:didFailWithServiceException:]|74|didFailWithServiceException 2013-01-17 15:00:13.937 DJ[10995:c07] DynamoDBWebServiceClient.m|-[DynamoDBWebServiceClient invoke:rawRequest:unmarshallerDelegate:]|131|Response Status Code : 400 2013-01-17 15:00:13.938 DJ[10995:c07] AmazonErrorHandler.m|+[AmazonErrorHandler errorFromExceptionWithThrowsExceptionOption:]|51|WARNING: An exception was thrown. Please call [AmazonErrorHandler shouldNotThrowExceptions] to change this behavior. 2013-01-17 15:00:13.939 DJ[10995:c07] *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0x7540100 &lt;x-coredata://279744BC-1B25-4170-AF2C-83676954BC3D-10995-00005B7C38D21AFA/Venue/p(null)&gt;'' *** First throw call stack: (0x1655012 0x147ae7e 0xe6ed8 0xe6887 0xe64c1 0xe6336 0x10b000 0x260c 0x1edc 0x4a3817 0x4a3882 0x3f2a25 0x3f2dbf 0x3f2f55 0x3fbf67 0x3bffcc 0x3c0fab 0x3d2315 0x3d324b 0x3c4cf8 0x24a2df9 0x24a2ad0 0x15cabf5 0x15ca962 0x15fbbb6 0x15faf44 0x15fae1b 0x3c07da 0x3c265c 0x282d 0x1d15) libc++abi.dylib: terminate called throwing an exception </code></pre> <p>I have tried setting:</p> <pre><code>[request setReturnsObjectsAsFaults:NO]; </code></pre> <p>but there is no difference in the result.</p> <p>I am not performing any updates on the data following the initial fetch. Am I missing something?</p> <p>&lt;&lt; EDIT 1 >></p> <p>I can see from the logging that when accessing the related object, the underlying message being sent to DynamoDB has a null key, so it is correct that DynamoDB can't fetch a result, but I don't understand why the key isnot being transmitted, as it is correctly listed in the DB.</p> <p>&lt;&lt; EDIT 2 >></p> <p>If I add a second relationship which is one to many and add the exact same entity into it, then access the one to many relationship first, I can then retrieve the exact same object via the one to one relationship as expected . . . <strong>has anyone got an example where they have successfully used DynamoDB for a one to one relationship</strong> as this seems like a bug?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload