Skip to content

Cannot use ActiveRecord helper to create associated model from parent model record #192

@mghadley

Description

@mghadley

Environment details

  • Programming language: Ruby
  • OS: Mac OS
  • Language runtime version: 3.1.2
  • Package version: 1.2.2

Steps to reproduce

  1. Set up a rails app with a model that has_many of another model
  2. Attempt to create a record of the child model from a record of the parent model with the following syntax: parent_model.child_models.create()

Whenever I do this I get this error: google-cloud-ruby/google-cloud-spanner/lib/google/cloud/spanner/convert.rb:120:in field_for_object': ArgumentError: Cannot determine type for nil values. (ActiveRecord::StatementInvalid)

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/ruby-spanner-activerecord API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions