-
Notifications
You must be signed in to change notification settings - Fork 40
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
unknown type in cursor: [object] #16
Comments
Hi @mividtim , thanks for reporting the issue. The library use I have tried to reproduce an issue, however everything is working fine: import "reflect-metadata";
import { Entity, Column } from 'typeorm';
@Entity()
class Demo {
@Column({
type: 'timestamp',
nullable: true,
})
videoDisplayTime!: Date | null;
}
console.log(Reflect.getMetadata('design:type', Demo.prototype, 'videoDisplayTime').name.toLowerCase()); // date Could you provide more information about your runtime environment (version of typescript, ts-node, etc...)? |
Hi there. Thanks for getting back so quickly. We're running |
NodeJS 10.15.3, yarn 1.16.0, and postgres 11.2. |
I have tried the same version of these dependencies, and everything is working fine. Could you share a piece of code that using this lib? |
I set up a contrived example. I believe the issue is with the naming strategy. This pagination library doesn't seem to use the naming strategy set in the TypeOrm configuration to derive proper column names for its pagination keys. https://github.com/mividtim/pagination-test Repro steps:
|
@mividtim thanks for the steps to reproduce an error. I will try to fix it in my free time, if you already know how to fix it, please give me some hints or feel free to send a PR. |
Hey guys! it's happening exactly the same. Any updates about it? Thank you! 😄 |
Hey there! No update. I basically skipped cursor pagination and am using page lengths and numbers, which is inferior, but workable if your data doesn't move fast. I wish this worked, but I didn't invest the time to make it work. |
it's a shame this is still an issue... |
Hey guys, sorry for the late reply. @mividtim @judehunter actually I have already fixed the naming strategy issue a few months ago, |
@benjamin658 at the time of my comment (9 days ago), I was using the latest version (which I believe was 0.6.0) I might be able to provide some more detail later, but I have since switched to limit/offset pagination instead. |
Hi @judehunter, thanks for your help. Since I still cannot reproduce the issue, it would be great if you can provide some more details. By the way, PR for fixing this issue is welcome. |
Hi @mabilbao @mividtim @judehunter @miohtama , I think I finally found the root cause, it's ts-node issue: TypeStrong/ts-node#511 For some reason ts-node Reflect.getMetadata of I will try to fix the function
|
We use tsc to compile, and run with node itself, and I was seeing object from the reflect call... |
Sorry to keep you waiting so long. I just fixed the issue, please upgrade to v0.6.1. |
Error: unknown type in cursor: [boolean]true any solution for this boolean |
it's a shame this is still an issue... |
@byteHulk This might get you a bit further down the road... https://github.com/mividtim/typeorm-cursor-pagination |
Hmm, maybe not. I don't see my commit that fixed the issue. :-( I long lost that computer. |
Having the same issue mentioned in #16 (comment) does not work with booleans or enum types |
Hi there! This library is awesome. It's working great for most use cases I've encountered. However, I'm getting a weird error from the internals of the library occasionally when querying against test fixtures that were inserted into my local database by other tests prior to my test running. The column on which I'm trying to paginate has the PG type
timestamp
.The entity is defined as follows:
Here's the error coming out of the test run, with internals snipped out.
Any ideas on what I we may be doing wrong would be greatly appreciated!
The text was updated successfully, but these errors were encountered: