Skip to content

#n1ql.bucket returns the collection in v5 #1799

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

Closed
babltiga opened this issue Aug 8, 2023 · 3 comments · Fixed by #1804
Closed

#n1ql.bucket returns the collection in v5 #1799

babltiga opened this issue Aug 8, 2023 · 3 comments · Fixed by #1804
Labels
type: bug A general bug

Comments

@babltiga
Copy link
Contributor

babltiga commented Aug 8, 2023

Based on the answers from #1536 and #1445 it seems that the #n1ql.bucket should always return bucket name starting from version 5, but still even in the latest versions, it returns the collection name.

I'm asking about this line https://github.com/spring-projects/spring-data-couchbase/blob/f41d4b94e07923fec2f75ce71c51ea7f376112d0/src/main/java/org/springframework/data/couchbase/repository/query/StringBasedN1qlQueryParser.java#L169C30-L169C30

Should this be fixed? Or was the change postponed for the next major version?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 8, 2023
@mikereiche
Copy link
Collaborator

mikereiche commented Aug 8, 2023

It looks like the second constructor has the correct call at line 197, but the first constructor has the incorrect call at line 169.

That plus StringN1qlQueryCreatorTests.spelTests would need to be changed. I'm trying to figure out if it was left like that. intentionally or if by accident/error.

@babltiga
Copy link
Contributor Author

babltiga commented Aug 9, 2023

OK, if you think it should be changed, I'm ready to create a PR )

@mikereiche mikereiche added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 9, 2023
@mikereiche
Copy link
Collaborator

mikereiche commented Aug 9, 2023

Yes. Submit the PR and I'll approve it. It will change the behavior mid-version, but it's a bug-fix Be sure to also fix the test case I indicated.

I'm not sure if you're already running the integration tests against a real cb server, but to do that edit src/test/resources/integration.properties to point to a real server before running mvn integration-test.

mine looks like this -

# Couchbase Integration-Test Default Properties
# If set to false, it is assumed that the host is managing the cluster and
# as a result no containers or anything will be spun up.
# Options: containerized, mocked, unmanaged
cluster.type=unmanaged
cluster.unmanaged.seed=127.0.0.1:8091
cluster.adminUsername=Administrator
cluster.adminPassword=password
cluster.unmanaged.numReplicas=0

babltiga added a commit to babltiga/spring-data-couchbase that referenced this issue Aug 10, 2023
mikereiche pushed a commit that referenced this issue Aug 10, 2023
mikereiche pushed a commit that referenced this issue Aug 10, 2023
mikereiche pushed a commit that referenced this issue Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants