Migrating data

15 views
Skip to first unread message

Otto

unread,
May 3, 2012, 4:22:40 AM5/3/12
to scala...@googlegroups.com
Hi,

salat seems to be very intolerant to changes in the database, throwing exceptions if a field type has changed or similar.

Whats the best to migrate the data structures in mongo with Salat?

Thanks,
Otto

rose katherine toomey

unread,
May 3, 2012, 6:34:57 AM5/3/12
to scala...@googlegroups.com

Hi Otto,

When you change the model, you need to manually update your documents to match the new expectations.

Best,
Rose

Wes Freeman

unread,
May 3, 2012, 9:05:06 AM5/3/12
to scala...@googlegroups.com
This is typical with most of the "ODMs", by the way--in particular with type changes. 

Can you use Options to have fields in your model that might not be in your database? (I think I tried this at one point, and it worked--is it a best practice?)

Wes

Otto

unread,
May 7, 2012, 7:31:43 AM5/7/12
to scala...@googlegroups.com
So the actual migration, you would have to do manually. Makes sense somehow :)
Reply all
Reply to author
Forward
0 new messages