-
Notifications
You must be signed in to change notification settings - Fork 525
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
Shorten UUID for relationship in include request. #985
Comments
@gmarquet, exmaple according to your description works fine in my bug report template. |
I came across a similar issue last week, related to rails/rails#28044. Not sure when a fix will come on the Rails side, but until then I made a branch of 0.9.x with a small patch here: awmichel/jsonapi-resources@c6aa622. I'll open a PR against jsonapi-resources with the fix as well. 👍 |
i replaced |
reproduces by changing address = Address.take
# D, [2017-02-21T17:30:54.710066 #31387] DEBUG -- : Address Load (0.2ms) SELECT "addresses".* FROM "addresses" LIMIT $1 [["LIMIT", 1]]
# => #<Address id: "c6ecb4f7-e004-437c-b7f6-3d0e048b55ea", user_id: 9984831, street: "main st">
address.class.columns.detect { |c| c.name == 'user_id' }
# => #<ActiveRecord::ConnectionAdapters::PostgreSQLColumn:0x000000047530d8 @name="user_id", @table_name="addresses", @sql_type_metadata=#<ActiveRecord::ConnectionAdapters::SqlTypeMetadata:0x00000004753510 @sql_type="integer", @type=:integer, @limit=nil, @precision=nil, @scale=nil>, @null=true, @default=nil, @default_function=nil, @collation=nil, @comment=nil> |
So that its |
Closing for now as it does look to be an ActiveRecord bug. Let's reopen if this turns out to be a bug in JR. |
I got the current set up on 0.9.0:
And my request with the
include
parameter look like that :As you can see the UUID is not properly set. It seems to be cut before the first letter.
90c544c0-1f43-4a71-971e-0fdfc2dae054 => 90
4eb84daf-2134-4598-9635-ffda7e780e90 => 4
ff38d15b-0dc0-484b-a38a-327d4977fddc => 0
And the root include property is missing.
Does anyone have experience the same problems?
The text was updated successfully, but these errors were encountered: