Ilya Priven

Results 164 comments of Ilya Priven

The issue is that `attribute_values` are not populated? However, if you access those attributes directly (e.g. `.stimulus_type`), are they available?

The focus on my question is, `attribute_values` aside, can you access those extra attributes by performing simple attribute access, e.g. `stimulus.stimulus_type`?

``` stype2 = stimulus.stimulus_type # THIS IS NOT OK ``` By "THIS IS NOT OK" you mean `stype2 is None` while it should not be?

What's throwing me off here is: ``` AttributeError: 'Result' object has no attribute 'stimulus_type' ``` There's no class named Result in PynamoDB, so where are we getting this class/object from?

This is really interesting and sounds like a bug. I'll try to reproduce with a smaller test case.

That's always appreciated. I'm suspecting that perhaps we have a per-table lookup in one of those `Connection` classes, and we end up deciding that a particular table can only produce...

Trying to do a naïve reproduction, it seems to work correctly: ```python from pynamodb.attributes import UnicodeAttribute from pynamodb.indexes import GlobalSecondaryIndex, AllProjection from pynamodb.models import Model class FooValueIndex(GlobalSecondaryIndex): class Meta: index_name...

> For my own learning could you point me at the bit of the code base that handles 'the model takes "ownership" of that index class'? https://github.com/pynamodb/PynamoDB/blob/69f664339a096b40ab42ba1df26eb496c7740338/pynamodb/models.py#L255-L256 > The subclassing...

Make sure you either (a) delete the old table first, or (b) add the GSI/LSI through AWS console or some other means.

Why is this unexpected behavior? You are asking only for specific attributes to be read from the database, and the values of the other attributes (locally defined on the model)...