manifold icon indicating copy to clipboard operation
manifold copied to clipboard

[SQL] Add all combinations of element refs and ids for 'create' methods

Open EotT123 opened this issue 1 year ago • 1 comments

This pull request enhances the create methods for SQL objects by offering more flexibility for handling foreign keys. Previously, users had to choose between object references or IDs, but now they can mix and match as needed. Additionally, identical or nearly identical code has been removed.

Example:

  • previously:
create(Foo fooRef, Bar barRef, ...)
create(Integer fooId, Integer barId, ...)
  • with this PR:
create(Foo fooRef, Bar barRef, ...)
create(Integer fooId, Integer barId, ...)
create(Foo fooRef, Integer barId, ...)
create(Integer fooId, Bar barRef, ...)

EotT123 avatar Apr 27 '24 22:04 EotT123

@rsmckinney I wasn't sure where to put some tests. Feel free to add them in the correct location.

EotT123 avatar Apr 28 '24 22:04 EotT123