Skip to content

Conversation

@scrappydog
Copy link

(via converters)

@scrappydog
Copy link
Author

My specific usecase was the desire to use a Guid for a hashkey... I would be happy to provide sample code if you want to see it in action...

Cheers

@PavelSafronov
Copy link

Can you please post a sample usage of this fix? A class definition, the converter you are using, and usage of the context object with sample data.

@scrappydog
Copy link
Author

Where is a good place for me to post/send a complete working test
case/sample?

On Tue, Jul 17, 2012 at 7:10 PM, PavelSafronov <
[email protected]

wrote:

Can you please post a sample usage of this fix? A class definition, the
converter you are using, and usage of the context object with sample data.


Reply to this email directly or view it on GitHub:

https://github.com/amazonwebservices/aws-sdk-for-net/pull/3#issuecomment-7054170

@PavelSafronov
Copy link

Either on GitHub or you can just forward it to me.

-----Original Message-----
From: Eric Bowen [mailto:[email protected]]
Sent: Wednesday, July 18, 2012 8:54 AM
To: Safronov, Pavel
Subject: Re: [aws-sdk-for-net] Enhancement: Added support for alternate hash and range key datatypes (#3)

Where is a good place for me to post/send a complete working test case/sample?

On Tue, Jul 17, 2012 at 7:10 PM, PavelSafronov < [email protected]

wrote:

Can you please post a sample usage of this fix? A class definition,
the converter you are using, and usage of the context object with sample data.


Reply to this email directly or view it on GitHub:

https://github.com/amazonwebservices/aws-sdk-for-net/pull/3#issuecomme
nt-7054170


Reply to this email directly or view it on GitHub:
https://github.com/amazonwebservices/aws-sdk-for-net/pull/3#issuecomment-7072882

@scrappydog
Copy link
Author

I have a sample application ready for you...

What is a good (non-github) email address to send it to?

Thanks-

-Eric

([email protected])

On Wed, Jul 18, 2012 at 10:39 AM, PavelSafronov <
[email protected]

wrote:

Either on GitHub or you can just forward it to me.

-----Original Message-----
From: Eric Bowen [mailto:[email protected]]
Sent: Wednesday, July 18, 2012 8:54 AM
To: Safronov, Pavel
Subject: Re: [aws-sdk-for-net] Enhancement: Added support for alternate
hash and range key datatypes (#3)

Where is a good place for me to post/send a complete working test
case/sample?

On Tue, Jul 17, 2012 at 7:10 PM, PavelSafronov < [email protected]

wrote:

Can you please post a sample usage of this fix? A class definition,
the converter you are using, and usage of the context object with sample
data.


Reply to this email directly or view it on GitHub:

https://github.com/amazonwebservices/aws-sdk-for-net/pull/3#issuecomme
nt-7054170


Reply to this email directly or view it on GitHub:

https://github.com/amazonwebservices/aws-sdk-for-net/pull/3#issuecomment-7072882


Reply to this email directly or view it on GitHub:

https://github.com/amazonwebservices/aws-sdk-for-net/pull/3#issuecomment-7074226

@PavelSafronov
Copy link

Thank you for the suggestion, but the problem that this requests attempts to fix is easily resolved using the existing SDK.

The suggested code change would allow the markup of a class as follows:

[DynamoDBTable("Books")]
public class Book
{
    [DynamoDBHashKey, DynamoDBProperty(typeof (GuidTypeConverter))]
    public Guid Id { get; set; }
}

Specifically, multiple attributes would be set on a single property. The current version of the SDK does not permit this.

However, Guid objects can still be used as Hash and Range keys (though still not as Version), as below:

[DynamoDBTable("Books")]
public class Book
{
    [DynamoDBHashKey(Converter = typeof(GuidTypeConverter))]
    public Guid Id { get; set; }
}

@scrappydog
Copy link
Author

Learn something new every day... :-)

This is a good example of the AWSSDK not being very self documenting
(features like this are not easily discoverable...)

Just my opinion...

Thanks!

Sent from my iPhone

On Jul 18, 2012, at 6:23 PM, PavelSafronov
[email protected]
wrote:

Thank you for the suggestion, but the problem that this requests attempts to fix is easily resolved using the existing SDK.

The suggested code change would allow the markup of a class as follows:

[DynamoDBTable("Books")]
public class Book
{
   [DynamoDBHashKey, DynamoDBProperty(typeof (GuidTypeConverter))]
   public Guid Id { get; set; }
}

Specifically, multiple attributes would be set on a single property. The current version of the SDK does not permit this.

However, Guid objects can still be used as Hash and Range keys (though still not as Version), as below:

[DynamoDBTable("Books")]
public class Book
{
   [DynamoDBHashKey(Converter = typeof(GuidTypeConverter))]
   public Guid Id { get; set; }
}

Reply to this email directly or view it on GitHub:
https://github.com/amazonwebservices/aws-sdk-for-net/pull/3#issuecomment-7086614

@PavelSafronov
Copy link

We're always looking for input like this to improve the SDK, and we'll try to address this specific issue in a future release.
Also, feel free to drop us a line on the AWS Forums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

guidance Question that needs advice or information.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants