Support nested nullable objects
kettanaito opened this issue · comments
- Originated from #202
This has to be supported:
const db = factory({
user: {
id: primaryKey(String),
permissions: nullable(() => ({
id: String,
})),
},
})
But it's not. Recursive nullable objects as well. No primary key needed. An API without a getter function would be preferable: nullable({ ... })
.
@kettanaito I'll give this a crack 😉
Hi guys,
I opened a new PR for solving this issue with an api that doesn't use a nullable getter as @kettanaito asked
Can someone please take a look at it here ?
@kettanaito @abitbetterthanyesterday please let me know if this solution is acceptable and if so I will add some notes about it in the documentation
Thanks