iyo does it make sense to have classes which shoul...
# announcements
a
iyo does it make sense to have classes which should probably be immutable mutable to make database management easier? for example... let's say I am using MongoDB with POJO mapping... if I have a complex immutable class it will be a pain to make a copy of it...
i.e.,
Copy code
data class Group(
    val _id: String,
    val priority: Int,
    val permissionSections: Map<String, PermissionSection>
) {
    data class PermissionSection(
        val permissionsEnabled: Set<String> = emptySet(),
        val permissionsDisabled: Set<String> = emptySet()
    )
}
m
Do you have an example?
a
this is an example if they are mutable
<https://gist.github.com/andrewgazelka/5e2f45667a3029bb024ef60be4353bbd>