Comments (6)
I think this is a valid issue.
Some context for investigation: spring-attic/spring-cloud-gcp#1832.
from spring-cloud-gcp.
Hello @Rajkumar061299 , can you clarify what is the behavior you're seeing with Objectify that you're expecting with the Spring Cloud GCP Data Datastore module?
When I have a entity defined like this:
@Entity
public class ObjectifyLibrary {
@Id private String id = UUID.randomUUID().toString();
@Unindex private String primitive;
@Unindex private Set<String> collectionOfPrimitive;
@Unindex private Map<String, String> mapOfPrimitives;
@Unindex private ObjectifyBook ref;
@Unindex private List<ObjectifyBook> refs;
@Unindex private Map<String, ObjectifyBook> mapOfRefs;
The resulting entity in the console looks like this:
The above matches the current behavior of Spring Cloud GCP Data Datastore, when I modify an existing example of the have the same set of field types:
In an attempt to see what would happen, I modified the logic to mark the list or map as "exclude from indexes", I get an error from the server:
com.google.datastore.v1.client.DatastoreException: Exclude from indexes cannot be set on a list value at com.google.datastore.v1.client.RemoteRpc.makeException(RemoteRpc.java:184) ~[datastore-v1-proto-client-2.18.5.jar:2.18.5]
So based on the above, I am not currently seeing a difference in behavior, and I also don't see that there's an available modification to the way the library is marking "exclude from indexes" given that it would result in an exception.
from spring-cloud-gcp.
Hi @burkedavison, I was trying to Unindex the map in Objectify version 5.1.22, and it got unindexed properly.
import com.googlecode.objectify.annotation.*;
import java.io.Serializable;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import lombok.Data;
@Entity
@Index
@Data public class Library implements Serializable {
@Id private String id = UUID.randomUUID().toString();
@Unindex private Map<String, Set<String>> attributes;
}
![Screenshot 2024-04-06 at 12 50 05 PM](https://private-user-images.githubusercontent.com/85780710/320189431-101f4857-d242-4abd-88d0-b5d9bd7e1458.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTQwODI5OTgsIm5iZiI6MTcxNDA4MjY5OCwicGF0aCI6Ii84NTc4MDcxMC8zMjAxODk0MzEtMTAxZjQ4NTctZDI0Mi00YWJkLTg4ZDAtYjVkOWJkN2UxNDU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDI1VDIyMDQ1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkMTdiMzQ2NmE0MDdlZGJmYWM2ZDdjZDY3NTc2YzIwN2JhMWQ3MjY0OWU3NzBmNzhmZDg5NWQ1ZDRhOGJkMjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.nS3OxTpqZMKYBwWll6rT3CZy6dcKjxxuj3er9lFI3yg)
Could you please share the GitHub link for the Objectify example you tried?
from spring-cloud-gcp.
Here's the example I was using - now updated to also have a Map<String, Set>:
https://github.com/burkedavison/objectify-datastore-example/tree/main
I'm still getting the same behavior - not what you're seeing in your screenshot.
from spring-cloud-gcp.
Hi @burkedavison , In our application, we are currently using Objectify version 5.1.22, which allows us to Unindex lists or sets of objects, as well as maps. However, after further investigation, we discovered that newer versions of Objectify and Google Datastore client libraries do not support these types. Thank you for your assistance with this issue. We can close this issue.
from spring-cloud-gcp.
Sounds good - thank you for your patience and best wishes on your application.
from spring-cloud-gcp.
Related Issues (20)
- doc: Readme documentation and links are not up-to-date
- Auto-Config targeting incorrect project? HOT 17
- Expose Micrometer metrics for the Logback LoggingAppender HOT 1
- java.lang.ClassNotFoundException: com.google.cloud.sql.ConnectorRegistry when using spring-cloud-gcp v.5.1.0 HOT 18
- RejectedExecutionException during Graceful Shutdown when publishing with PubSubPublisherTemplate HOT 12
- Spring codegen: update and simplify generator logic after recent changes in gapic client generation HOT 1
- Add documentation for using Cloud Memorystore with TLS and/or authentication HOT 7
- Support Spring 6.1.x ThreadPoolTaskScheduler lifecycle changes/late-shutdown
- Document new publisher executor configuration settings
- BigQueryJsonDataWriter never closes when using BigQueryTemplate.writeJsonStream() HOT 1
- 5.1.1 release failed due to SNAPSHOT version in preview modules
- GCP PubSub Authorisation Issue In Java Using Service Account HOT 4
- Since 5.1.0 the warning "Application name is not set. Call Builder#setApplicationName." is logged HOT 8
- Spring Boot+datastore throws "Type must not be Null" when JsonNode is used as attribute on a Datastore Entity HOT 15
- secretmanager config import cause native image docker silently crash HOT 1
- Request for GenericTypeIndicator Support in spring-cloud-gcp-starter-data-firestore for Handling Generic Types
- TransportChannelProvider bean overwrites maxInboundMetadataSize with null HOT 3
- spring-cloud-gcp-dependencies BOM forces to use specific version of depenencies HOT 4
- codegen to allow hermetic build configs to setup optional googleapis version on library level
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-cloud-gcp.