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

[SPIKE] Create mutable models facade over cocina models #3323

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jcoyne
Copy link
Collaborator

@jcoyne jcoyne commented Mar 23, 2022

Why was this change made? 🤔

This makes working with Reform forms easier. We no longer need to have a serialize and deserialze method for each form class that we use. This also makes it possible to use FactoryBot, as it requires mutable models. These changes should make it possible for Rails developers to work with these models as if they were ActiveRecord objects and not have to be concerned about how they are serialized or deserialized to cocina.

How was this change tested? 🤨

Test suite

@jcoyne jcoyne force-pushed the entities branch 12 times, most recently from afa1dd1 to 5cfc58f Compare March 24, 2022 14:08
@jcoyne jcoyne marked this pull request as ready for review March 24, 2022 14:09
@jcoyne jcoyne force-pushed the entities branch 5 times, most recently from d0ed3e8 to 166549b Compare March 25, 2022 21:11
@jcoyne jcoyne force-pushed the entities branch 3 times, most recently from b042c39 to c8ce647 Compare April 6, 2022 17:20
before do
@cocina = instance_double(Cocina::Models::DRO, externalIdentifier: 'druid:987', identification: identification)
@item = build(:item, source_id: 'source id')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this valid

@jcoyne jcoyne force-pushed the entities branch 2 times, most recently from 498fa10 to 5aa055b Compare April 7, 2022 14:07
@jcoyne jcoyne changed the title [SPIKE] Create local models so we can avoid cocina edits [SPIKE] Create mutable models facade over cocina models Apr 7, 2022
@ndushay
Copy link
Contributor

ndushay commented May 11, 2022

@jcoyne is this still valid, or is it superseded by PR #3453

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