MongoDB aggregation – count distinct in sub array

I’m trying to count distinct values in sub array per document. So far I’m getting totals. My collection: [ { “_id”: “5e013ca474082f6852”, “name”: [ { “value”: “Oak”, “date”: “2020-01-01 00:10:57” } ], “colors”: [ { “nice”: “bla bala”, “color”: “Blue” }, { “nice”: “bla bala”, “color”: “Red” }, { “nice”: “bla bala”, “color”: “Blue” },…

Details

More than one row with the given identifier was found

I got this error in my spring boot application. when I want to call this repository I got this error org.hibernate.HibernateException: More than one row with the given identifier was found: 10, for class: org.rajman.lbs.neshan.business.data.model.LayersCategoriesEntity at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86) at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:143) at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:2174) at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:692) at org.hibernate.type.EntityType.resolve(EntityType.java:434) at org.hibernate.engine.internal.TwoPhaseLoad.doInitializeEntity(TwoPhaseLoad.java:154) at org.hibernate.engine.internal.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:128) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.performTwoPhaseLoad(AbstractRowReader.java:238) at org.hibernate.loader.plan.exec.process.internal.AbstractRowReader.finishUp(AbstractRowReader.java:209) at org.hibernate.loader.plan.exec.process.internal.ResultSetProcessorImpl.extractResults(ResultSetProcessorImpl.java:133)…

Details

How to route traffic from Nginx ingress to an application Tomcat server

I have a Kubernetes cluster with an (kubernetes) Nginx Ingress controller with the following ingress rules: apiVersion: extensions/v1beta1 kind: Ingress metadata: name: ingress-rules # namespace: default ### Virtual hosts ### spec: rules: – host: dashboard.example.com http: paths: – path: / backend: serviceName: test servicePort: 443 The test application is served by a Tomcat server. The…

Details