Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to specify an attribute as a primary key. #37

Open
github-actions bot opened this issue Mar 17, 2022 · 0 comments
Open

Allow user to specify an attribute as a primary key. #37

github-actions bot opened this issue Mar 17, 2022 · 0 comments
Labels
enhancement New feature or request todo

Comments

@github-actions
Copy link

Requires either changing default primary key or using secondary index

# TODO: Allow user to specify an attribute as a primary key.

      run_save_callbacks do
        raise RethinkORM::Error::DocumentInvalid.new(self) unless valid?

        # TODO: Allow user to specify an attribute as a primary key.
        # Requires either changing default primary key or using secondary index
        @id = @@uuid_generator.next(self) if @id.presence.nil?

        response = Connection.raw_json(self.to_json) do |q, doc|
@github-actions github-actions bot added the todo label Mar 17, 2022
@caspiano caspiano removed their assignment Mar 17, 2022
@caspiano caspiano added the enhancement New feature or request label Mar 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request todo
Projects
None yet
Development

No branches or pull requests

1 participant