Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embedded entities cannot store string values larger than 1500 bytes #132

Closed
huysamen opened this issue Oct 8, 2018 · 5 comments · Fixed by #182
Closed

Embedded entities cannot store string values larger than 1500 bytes #132

huysamen opened this issue Oct 8, 2018 · 5 comments · Fixed by #182

Comments

@huysamen
Copy link
Contributor

huysamen commented Oct 8, 2018

In Datastore, indexed string values cannot exceed 1500 bytes, however unindexed values can. When excluding an embedded entity from indexing, Datastore does exclude it and all its properties from indexing, however, you still have to explicitly pass through 'excludeFromIndexing' for the entity properties, otherwise you cannot store strings longer than 1500 bytes.

See this issue.

Currently in gstore-node, you can either exclude the embedded entity, or specific properties of the embedded entity, not both. This means if I exclude the entire embedded entity, none of its string properties can be longer than 1500 bytes. The alternative is to exclude all its properties, which is tedious.

@sebelga
Copy link
Owner

sebelga commented Oct 8, 2018

Hello,
The excludeFromIndexes api of the Datastore is not quite very clear 😊I had an opened discussion without getting the response I wanted at the end: googleapis/nodejs-datastore#12 (comment)

You are saying that when setting excludeFromIndexes: true on an embedded entity it should both set it on the entity and all its properties?

@huysamen
Copy link
Contributor Author

huysamen commented Oct 8, 2018

Unfortunately yes... It's really stupid, but that is what I understand from that discussion in the linked issue.

@sebelga
Copy link
Owner

sebelga commented Oct 11, 2018

Ok I will give it a try as soon as I can and let you know.

@aroraenterprise
Copy link

Was there ever a fix for this? I have run into the same issue.

sebelga added a commit that referenced this issue Sep 11, 2019
…roperties of Array embedded

The v4.2.0 of the Datastore client allows wildcard "*" to target all the properties of an embedded
entity. The logic to define the Array of excludeFromIndexes has been updated to make use of it.

fix #132
@sebelga
Copy link
Owner

sebelga commented Sep 11, 2019

Hi,
Sorry for the late answer. A fix will be available on the coming v7.0.0 release.
Cheers 👍

sebelga added a commit that referenced this issue Sep 11, 2019
…embedded entities (#182)

The v4.2.0 of the Datastore client allows wildcard "*" to target all the properties of an embedded
entity. The logic to define the Array of excludeFromIndexes has been updated to make use of it.

fix #132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants