Can I set my own Object ID?

I’m experimenting with some different patterns for “many to many” relationships.

If I extend the Moralis Object to create a new class in the DB, can I set my own object ID when I add new records?

No, primary keys are handled by Moralis automatically.

Thank you, after thinking through it, that wouldn’t have worked anyway.

Was going to use filehash as PK, but if a second user uploads the same file it breaks.

Still trying to deepen my knowledge for best practices using “Relation” patterns and Queries for many to many relationships.

1 Like