File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
main/java/com/amplifyframework/core/model
test/java/com/amplifyframework/core/model Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,8 @@ default String getPrimaryKeyString() {
6969 try {
7070 if (resolveIdentifier () instanceof ModelIdentifier ) {
7171 return ((ModelIdentifier <?>) resolveIdentifier ()).getIdentifier ();
72- } else if (resolveIdentifier () instanceof String ) {
73- return (String ) resolveIdentifier ();
7472 } else {
75- return ModelIdentifier .Helper .escapeAndEncapsulateString (
76- resolveIdentifier ().toString ()
77- );
73+ return resolveIdentifier ().toString ();
7874 }
7975 } catch (Exception exception ) {
8076 throw (new IllegalStateException ("Invalid Primary Key" , exception ));
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ class ModelIdentifierTest {
4444 @Test
4545 fun cpk_non_string_without_model_identifier_with_no_sort_key () {
4646 val expectedKey = 123
47- val expectedKeyString = " \" 123\" "
47+ val expectedKeyString = " 123"
4848
4949 val identifier = IntModelWithoutIdentifier .builder().customId(expectedKey).build().primaryKeyString
5050
You can’t perform that action at this time.
0 commit comments