# Pastebin VG7hKIbp ➜ Red git:(master) ✗ rakudobrew exec perl6 -I. -MRed -e 'model Bla { ... }; model Ble { has $!id is serial; has Bla @.blas is relationship{ .ble-id } }; model Bla { has $!id is serial; has UInt $!ble-id is column{ :references{ Ble.id }, :!nullable }; has Str $.name is column; has Ble $.ble is relationship{ .ble-id } }; my $*RED-DB = database "SQLite"; Bla.^create-table; Ble.^create-table; Ble.^create: :blas[{:name}, {:name}]; .say for Bla.^all; Bla.^create: :name' Bla.new(name => "bla") Bla.new(name => "ble") Unknown Error!!! Please, copy this backtrace and open an issue on https://github.com/FCO/Red/issues/new Driver: Red::Driver::SQLite Original error: X::DBDish::DBError.new(driver-name => "DBDish::SQLite", native-message => "NOT NULL constraint failed: bla.ble_id", code => 19, why => "Error") Original error: DBDish::SQLite: Error: NOT NULL constraint failed: bla.ble_id (19) in method execute at /Users/fernando/.rakudobrew/versions/moar-2019.07.1/install/share/perl6/site/sources/D5BEA102BD51068862724AC23E192CE9F8A6C519 (DBDish::SQLite::StatementHandle) line 46 in method stt-exec at /Users/fernando/RedBot/../Red/lib/Red/Driver/SQLite.pm6 (Red::Driver::SQLite) line 34 in method execute at /Users/fernando/Red/lib/Red/Driver.pm6 (Red::Driver) line 77 in method save at /Users/fernando/RedBot/../Red/lib/MetamodelX/Red/Model.pm6 (MetamodelX::Red::Model) line 299 in method create at /Users/fernando/RedBot/../Red/lib/MetamodelX/Red/Model.pm6 (MetamodelX::Red::Model) line 368 in block at -e line 1 Actually thrown at: in block at /Users/fernando/Red/lib/Red/Statement.pm6 (Red::Statement) line 14 in any at /Users/fernando/Red/lib/Red/Statement.pm6 (Red::Statement) line 12 in method stt-exec at /Users/fernando/RedBot/../Red/lib/Red/Driver/SQLite.pm6 (Red::Driver::SQLite) line 34 in method execute at /Users/fernando/Red/lib/Red/Driver.pm6 (Red::Driver) line 77 in method save at /Users/fernando/RedBot/../Red/lib/MetamodelX/Red/Model.pm6 (MetamodelX::Red::Model) line 299 in method create at /Users/fernando/RedBot/../Red/lib/MetamodelX/Red/Model.pm6 (MetamodelX::Red::Model) line 368 in block at -e line 1