# Unexpected keys \[:id\] in Hash input

**URL:** https://discourse.rom-rb.org/t/unexpected-keys-id-in-hash-input/221
**Category:** Issues
**Created:** [April 4, 2018, 2:34pm UTC](https://discourse.rom-rb.org/t/unexpected-keys-id-in-hash-input/221 "2018-04-04T14:34:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![xero88](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/xero88/32/148_2.png) [@xero88](https://discourse.rom-rb.org/u/xero88)
#### Post date: [April 4, 2018, 2:34pm UTC](https://discourse.rom-rb.org/t/unexpected-keys-id-in-hash-input/221/1 "2018-04-04T14:34:35Z")

</div>

When i’m creating a row in the database, via the repository, I got this :

`MyApp.instance.container['repositories.companies'].create(company)`

> Dry::Struct::Error:  
> [Company.new] unexpected keys [:id] in Hash input

The row is well created. My entity is schema hash type.

And is this possible to use schema hash of type strict\_with\_defaults with rom-rb ?

---

<div class="post-metadata">

### Author: ![solnic](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.rom-rb.org/solnic/32/279_2.png) [@solnic](https://discourse.rom-rb.org/u/solnic)
#### Post date: [April 6, 2018, 12:00pm UTC](https://discourse.rom-rb.org/t/unexpected-keys-id-in-hash-input/221/2 "2018-04-06T12:00:15Z")

</div>

What’s `company` in your case? How did you define it? Command methods return data from the database, and it looks like your company struct doesn’t allow `:id` attribute.
