{"action":"opened","issue":{"url":"https://api.github.com/repos/javers/javers/issues/253","labels_url":"https://api.github.com/repos/javers/javers/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/javers/javers/issues/253/comments","events_url":"https://api.github.com/repos/javers/javers/issues/253/events","html_url":"https://github.com/javers/javers/issues/253","id":117217716,"number":253,"title":" ENTITY_INSTANCE_WITH_NULL_ID JaVers runtime error","user":{"login":"yong86","id":7461579,"avatar_url":"https://avatars.githubusercontent.com/u/7461579?v=3","gravatar_id":"","url":"https://api.github.com/users/yong86","html_url":"https://github.com/yong86","followers_url":"https://api.github.com/users/yong86/followers","following_url":"https://api.github.com/users/yong86/following{/other_user}","gists_url":"https://api.github.com/users/yong86/gists{/gist_id}","starred_url":"https://api.github.com/users/yong86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yong86/subscriptions","organizations_url":"https://api.github.com/users/yong86/orgs","repos_url":"https://api.github.com/users/yong86/repos","events_url":"https://api.github.com/users/yong86/events{/privacy}","received_events_url":"https://api.github.com/users/yong86/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-16T21:06:19Z","updated_at":"2015-11-16T21:06:19Z","closed_at":null,"body":"Hello,\r\nI have a one to many relation between customer and customer attributes tables:\r\ncustomer model: \r\n\r\n\r\n\r\n    @Entity\r\n    @Table(name = \"CUSTOMER\")\r\n    @JsonIdentityInfo(generator = ObjectIdGenerators.None.class, property = \"@id\", scope =      Customer.class)\r\n    public class Customer implements Serializable {\r\n\t@Id\r\n\t@SequenceGenerator(name=\"SEQ_GEN\", sequenceName=\"SEQ_CUSTID\",  allocationSize=1)\r\n\t@GeneratedValue(strategy = GenerationType.SEQUENCE, generator=\"SEQ_GEN\")\r\n\t//@GeneratedValue(strategy = GenerationType.IDENTITY)\r\n\t@Column(name = \"CUSTOMER_ID\")\r\n\tprivate Long\t\t\t\t\tcustomerId;\r\n\r\n\t@Column(name = \"CUSTOMER_EMAIL\")\r\n\tprivate String\t\t\t\t\tcustomerEmail;\r\n\r\n\t@Column(name = \"CUSTOMER_NAME\", columnDefinition = \"nvarchar(500)\", nullable = false)\r\n\tprivate String\t\t\t\t\tcustomerName;\r\n\r\n\t@OneToMany(mappedBy = \"customer\", fetch = FetchType.EAGER,cascade = CascadeType.ALL)\r\n\t@PrivateOwned\r\n\tprivate List<CustomerAttr>\t\tcustomerAttrs;\r\n\r\nsecond model:\r\n\r\n    @Entity\r\n    @Table(name = \"CUSTOMER_ATTRS\")\r\n    @JsonIdentityInfo(generator = ObjectIdGenerators.None.class)\r\n    public class CustomerAttr  implements Serializable {\r\n\t@Id\r\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\r\n\t@Column(name = \"CUSTOMER_ATTR_ID\")\r\n\tprivate Long\t\tcustomerAttrId;\r\n\r\n\t@Column(name = \"ATTRIBUTE_VALUE\", columnDefinition = \"nvarchar(500)\")\r\n\tprivate String\t\tattributeValue;\r\n\r\n\t@JsonIgnore\r\n\t@ManyToOne\r\n\t@PrimaryKeyJoinColumn(name = \"CUSTOMER_ID\")\r\n\tprivate Customer\tcustomer;\r\n\r\n\t@Column(name = \"CUSTOMER_ID\")\r\n\tprivate Long\t\tcustomerId;\r\n\r\nwhen I'm trying to commit the customer only without any attributes ,I got this info + an exception:\r\n> INFO org.javers.core.metamodel.type.TypeFactory - javersType of class im.data.model.Customer inferred as EntityType\r\n INFO org.javers.core.metamodel.type.TypeFactory - javersType of [class java.lang.Long] inferred as ValueType, it's used as id-property type\r\nINFO org.javers.core.metamodel.type.TypeFactory - javersType of java.util.List<im.data.model.CustomerAttr> inferred as ListType from prototype ListType{baseType:'interface java.util.List'}\r\n[qtp2101527076-48] INFO org.javers.core.metamodel.type.TypeFactory - javersType of java.util.List<im.data.model.BillingAccount> inferred as ListType from prototype ListType{baseType:'java.util.List<im.data.model.CustomerAttr>'}\r\n[qtp2101527076-48] INFO org.javers.core.metamodel.type.TypeFactory - javersType of class im.data.model.CustomerAttr inferred as EntityType\r\n[qtp2101527076-48] INFO org.javers.core.metamodel.type.TypeFactory - javersType of [class java.lang.Long] inferred as ValueType, it's used as id-property type\r\n\r\nException: \r\n>ENTITY_INSTANCE_WITH_NULL_ID JaVers runtime error - Found Entity instance of class 'im.data.model.CustomerAttr' with null id\r\n"}}