Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Missing fk-constraint does not map properly for combines

Aperta
#353 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
ruby, sql
Ambito
databases

Direzione di ricerca

Begin with the combine(:comments) scenario described in the issue and inspect how missing foreign-key metadata is handled. No file, test, or executable reproduction is named; done requires agreeing on the behavior for missing constraints and documenting or testing the resulting warning or error.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug help wanted

Describe the bug

Given a standard one-to-many relationship Posts and Comments, where comments table has a post_id without a foreign-key constraint, the usage of combine will map every relationship to the primary node.

To Reproduce

Provide detailed steps to reproduce, an executable script would be best.

rom.relations[:posts].combine(:comments)

Expected behavior
Unsure, but warnings/documentation could help.

  1. Perhaps, warn/error when missing fk?
  2. Require "virtual_foreign_key"?

Your environment

  • Affects my production application: NO
  • Ruby version: 2.6.x, rails 5.2
  • OS: Catalina
Lingua principale
Ruby
Stelle
220
Fork
97
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di rom-rb/rom-sql

Tutte le issue di rom-rb/rom-sql

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.