- 
                Notifications
    
You must be signed in to change notification settings  - Fork 55
 
Description
Describe the bug
Using getItem(partitionKey: PK) where the partitionKey is a String in the data class which generates the schema produces the following error:
kotlin.NotImplementedError: An operation is not implemented: not yet implemented
	at aws.sdk.kotlin.hll.dynamodbmapper.model.internal.TableImplKt$tableImpl$1.getItem(TableImpl.kt:38) ~[dynamodb-mapper-jvm-1.4.58-beta.jar:na]Trying to use getItem { key = "a-string-key" } following the example on the blog, it said the type of the key required is the class which generates the schemas, instead of String.
Regression Issue
- Select this option if this issue appears to be a regression.
 
Expected behavior
- 
Calling getItem() without any error.
 - 
The type of the
keyingetItembuilder block should be the type ofDynamoDbPartitionKeydefined in the class. 
Current behavior
- 
Calling getItem() throws NotImplementedError
 - 
keyingetItembuilder block only accepts the class which generate the schemas, instead of the type ofDynamoDbPartitionKeydefined in the class. 
Steps to Reproduce
Using Java 23 and Kotlin 2.1.10
Data class to generate Schema
@DynamoDbItem
data class Planet(
    @DynamoDbPartitionKey
    val name: String,
    val id: Long
)Use getItem(), calling the getPlanet() with a Spring boot controller gives the error
    suspend fun getPlanet(): Planet? {
        val planetTable = mapper.getTable("planet-table", PlanetSchema)
        return planetTable.getItem("Jupiter")
    }Use getItem { }
    suspend fun getPlanet(): Planet? {
        val planetTable = mapper.getTable("planet-table", PlanetSchema)
        return planetTable.getItem { key = "Jupiter" }.item
    }Possible Solution
No response
Context
No response
AWS SDK for Kotlin version
1.4.58
Platform (JVM/JS/Native)
JVM
Operating system and version
macOS