Store an instance of a class extending @colyseus/schema into a database
-
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
-
Thank you, @endel. I will publish another quick question as a new thread if you don't mind.