Store an instance of a class extending @colyseus/schema into a database
virtumonde last edited by virtumonde
Is there a way to store an instance of a class extending @colyseus/schema directly into a database?
hi @virtumonde, you could use
instance.toJSON()and store that. you'd need to have your own way to restore/instantiate those objects by yourself when retrieving them from the database if you need to
virtumonde last edited by
Thank you, @endel. I will publish another quick question as a new thread if you don't mind.