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

Add topic on Custom data types column in Persistent #11

Merged
merged 3 commits into from
Sep 27, 2016

Conversation

psibi
Copy link
Member

@psibi psibi commented Sep 15, 2016

No description provided.

@psibi
Copy link
Member Author

psibi commented Sep 15, 2016

@snoyberg Is serializing and Unserializing like this recommended or is there some other better way to achieve the same ?

@snoyberg
Copy link
Member

It's bad from a DB management standpoint: it's just storing the data as JSON in the table, which is difficult to work with. The proper where is to just have two different fields in the entity. Whether you want to do it one way or the other though is up to personal preference, both work.

@psibi
Copy link
Member Author

psibi commented Sep 15, 2016

Note that it's not storing the data as JSON but as a list string in the database. But yeah, it's bad for writing DB queries. I will add up your comment in the page.

@psibi
Copy link
Member Author

psibi commented Sep 17, 2016

Ah, you are right. It's storing as JSON.

@psibi psibi merged commit eafd739 into yesodweb:master Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants