{"action":"closed","issue":{"url":"https://api.github.com/repos/greenrobot/greenDAO/issues/190","labels_url":"https://api.github.com/repos/greenrobot/greenDAO/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/greenrobot/greenDAO/issues/190/comments","events_url":"https://api.github.com/repos/greenrobot/greenDAO/issues/190/events","html_url":"https://github.com/greenrobot/greenDAO/issues/190","id":83986428,"number":190,"title":"One To One problem","user":{"login":"ray1984","id":3238570,"avatar_url":"https://avatars.githubusercontent.com/u/3238570?v=3","gravatar_id":"","url":"https://api.github.com/users/ray1984","html_url":"https://github.com/ray1984","followers_url":"https://api.github.com/users/ray1984/followers","following_url":"https://api.github.com/users/ray1984/following{/other_user}","gists_url":"https://api.github.com/users/ray1984/gists{/gist_id}","starred_url":"https://api.github.com/users/ray1984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ray1984/subscriptions","organizations_url":"https://api.github.com/users/ray1984/orgs","repos_url":"https://api.github.com/users/ray1984/repos","events_url":"https://api.github.com/users/ray1984/events{/privacy}","received_events_url":"https://api.github.com/users/ray1984/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/greenrobot/greenDAO/labels/Support%20/%20Not%20an%20issue","name":"Support / Not an issue","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-02T11:49:05Z","updated_at":"2015-06-30T18:37:14Z","closed_at":"2015-06-30T18:37:14Z","body":"I created structure from two entiites: Customer and Shop. One customer can have only one shop, and one shop can be binded only with one customer. My code:\r\n```\r\nEntity shop = schema.addEntity(\"Shop\");\r\nshop.addIdProperty();\r\nshop.addStringProperty(\"name\");\r\n\r\nEntity customer = schema.addEntity(\"Customer\");\r\ncustomer.addIdProperty();\r\ncustomer.addStringProperty(\"name\");\r\n\r\nProperty shopId = customer.addLongProperty(\"shopId\").getProperty();\r\ncustomer.addToOne(shop, shopId);\r\n\r\nProperty customerId = shop.addLongProperty(\"customerId\").getProperty();\r\nshop.addToOne(customer, customerId);\r\n```\r\n\r\nThat's my example code for saving entities:\r\n```\r\nShop shop = new Shop();\r\nshop.setName(\"shop #1\");\r\nlong shopId = daoSession.insert(shop);\r\n\r\nCustomer customer = new Customer();\r\ncustomer.setName(\"customer #1\");\r\ncustomer.setShopId(shopId);\r\nlong customerId = daoSession.insert(customer);\r\n```\r\n\r\nWhen I read Customer by customerId the object has propery getShop. BUT when I read Shop by shopId getCustomer == null, but it must contain \"customer 1\""}}