JWTRefreshTokenBundle
JWTRefreshTokenBundle copied to clipboard
Support to doctrine/mongodb-odm-bundle 4.x still with errors
Hi, lookslike the new version 0.8 doesn't fix all errors. Now, when I require the library I get that:
The mapping file /xxx/vendor/gesdinet/jwt-refresh-token-bundle/Resources/config/mongodb/doctrine-document/RefreshToken.mongodb.xml is invalid:
!! Line 8:0: Element '{http://doctrine-project.org/schemas/odm/doctrine-mongo-
!! mapping}document', attribute 'repositoryClass': The attribute 'repositoryClass' is not allowed.
!!
!! Line 9:0: Element '{http://doctrine-project.org/schemas/odm/doctrine-mongo-
!! mapping}field', attribute 'fieldName': The attribute 'fieldName' is not allowed.
Thanks for updating the library so fast!
@lcavero could you please test against dev-master , I fix xml mapping
Hi, I really need this fix. When we can expect this amendment to be on the master?
@pandresp could you please update to dev-master to test if this fix is working?
@markitosgv on dev-master
the previous error is not ocured,
but new one exists I think.
Is the table name was changed?
Base table or view not found: 1146 Table 'refresh_token' doesn't exist"
Do you now something about this?
In data base I have table named as refresh_tokens
with s
on end.
On version 0.7.1 working with refresh_tokens
table.
Yes, but look at this:
https://github.com/markitosgv/JWTRefreshTokenBundle/blob/40f03d12d8167f5fd1124ef9befb8ac3b07e1f87/Resources/config/mongodb/doctrine-document/RefreshToken.mongodb.xml#L8
Are you checking against last dev-master?
@markitosgv Hi, testing in dev-master solves the previous problem, a new problem happens now
No identifier/primary key specified for Document 'Gesdinet\JWTRefreshTokenB
!! undle\Document\RefreshToken'. Every Document must have an identifier/primar
!! y key.
Ty
Ok @lcavero
Could you please test changing line 9 of https://github.com/markitosgv/JWTRefreshTokenBundle/blob/40f03d12d8167f5fd1124ef9befb8ac3b07e1f87/Resources/config/mongodb/doctrine-document/RefreshToken.mongodb.xml#L9 to this:
<field field-name="id" type="id" id="true" />
@markitosgv, I think you do not understand exactly my case
In my project I use postgres DB for entity (and for refresh tokens). In last days I ad hybrid configuration postgres + mongoDB And then problems was started.
For clear, I want use postgres DB to store my entities and refresh tokens. Only for some dokuments I use mongoDB.
I see that you switch configuration form yaml
to xml
After switch the configuration is not the same
Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken:
type: entity
table: refresh_tokens
repositoryClass: Gesdinet\JWTRefreshTokenBundle\Entity\RefreshTokenRepository
<entity name="Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken">
shouldbe:
<entity name="Gesdinet\JWTRefreshTokenBundle\Entity\RefreshToken" table="refresh_tokens">
I think you forgot the table name
You're right @pandresp , mistake was introduced in PR #167 . Solved in b05c321ccc24205966f90222307f1cc783d14dfa, f5472176b7599f0ea39c1b868d542cda722c33b3 and waiting for a new release when @lcavero confirms
@markitosgv
The mapping file /home/luilli/FREELANCE/fly/core/vendor/gesdinet/jwt-refresh-token-bundle/Resources/config/mongodb/doctrine-document/RefreshToken.mongodb.xml is invalid:
Line 9:0: Element '{http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping}field', attribute 'id': The attribute 'id' is not allowed.
Ok sorry @lcavero try this:
<id field-name="id" />
Lookslike it works, no errors in cache clear. Great!
Yes, it generates the refresh token on login. Perfect!
@markitosgv Hola Marcos, no sé si me he perdido algo pero te cuento.
Para doctrine odm 4 si no me equivoco tienen que haber dos cosas.
El archivo RefreshToken.mongodb.xml tiene que estar como lo pusiste antes, con el campo