Skip to content

Commit

Permalink
return null instead of an error, add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jrchudy committed Sep 25, 2024
1 parent 97d5967 commit 6176ef7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions js/reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -4022,7 +4022,7 @@
*/
get bulkCreateForeignKeyObject() {
if (this._bulkCreateForeignKeyObject === undefined) {
verify(false, 'Call "computeBulkCreateForeignKeyObject" with the prefill object first');
this._bulkCreateForeignKeyObject = null;
}
return this._bulkCreateForeignKeyObject;
},
Expand Down Expand Up @@ -6727,13 +6727,15 @@

BulkCreateForeignKeyObject.prototype = {
/**
* the column that points to the table that rows are being selected from
* @returns ERMrest.ForeignKeyPseudoColumn
*/
get leafColumn () {
return this._leafColumn;
},

/**
* if the 2 foreign key columns are part of a unqiue key
* @returns boolean
*/
get isUnique () {
Expand Down Expand Up @@ -6766,12 +6768,12 @@
},

/**
* @returns {Object[]} filters array to use on leafColumn.reference for ensuring rows from the leaf table are only able to be added if their key information is not null
* @returns {Object[]} filters array to use on leafColumn.reference for ensuring rows from the table are only able to be added if their key information is not null
*/
andFiltersForLeaf: function() {
if (this._andFilters === undefined) {
var filters = [];
// loop through all of key columns of the leaf foreign key pseudo column that make up the key information for the leaf table of the association relationship and create non-null filters
// loop through all of key columns of the leaf foreign key pseudo column that make up the key information for the tablerows are selected from and create non-null filters
this._leafColumn.foreignKey.key.colset.columns.forEach(function(col) {
filters.push({
source: col.name,
Expand Down

0 comments on commit 6176ef7

Please sign in to comment.