So I found this on the docs right:
http://bookshelfjs.org/#Model-instance-format
Which says...
The format method is used to modify the current state of the model before it is persisted to the database. The attributes passed are a shallow clone of the model, and are only used for inserting/updating - the current values of the model are left intact.
but based on what that says, I'm not sure it's what I need. So I'll explain here what I'm trying to accomplish, and if someone could point me in the right direction, I'd appreciate it.
So I basically saving an "array" in a column using a , as a delimiter (I know it's bad practice, so sue me).
The thing is, when I'm retrieving this data later on, I need it to be back in it's array form. Whats the best way to achieve this?
I think you're looking for the opposite operation, which is parse.
That's exactly what I need @ricardogama thanks very much for your help :)
@KieronWiltshire Seems like this issue is resolved, I'm going to close.
Also, it's @ricardograca. They keep messing up your handle because of the other Ricardo 馃槀
Most helpful comment
@KieronWiltshire Seems like this issue is resolved, I'm going to close.
Also, it's @ricardograca. They keep messing up your handle because of the other Ricardo 馃槀