Community
Participate
Working Groups
Created attachment 195663 [details] Patch Some testscases use the Product1 eclass. The Hibernate Store assumes that the name of the Product1 is always set before it is persisted. The attached patch solves this some specific new testcases.
Created attachment 195664 [details] Patch
(In reply to comment #0) > Some testscases use the Product1 eclass. The Hibernate Store assumes that the > name of the Product1 is always set before it is persisted. That seems a little surprising, as Product1.name is not a required attribute in the ecore model. Can you please explain why the Hibernate Store makes this assumption? Does this assumption apply to all attributes, all EString attributes; what is the scope of this assumption?
Hi Eike, In this case the product name is used by Hibernate as the primary key. This is controlled by the teneo.jpa annotation on the product.name. It is to test non-generated primary keys. So for the hibernate store this is a required efeature, but not for the other stores. Would it make sense to make it required? gr. Martin
(In reply to comment #3) > In this case the product name is used by Hibernate as the primary key. This is > controlled by the teneo.jpa annotation on the product.name. It is to test > non-generated primary keys. Ah, I see ;-) > So for the hibernate store this is a required efeature, but not for the other > stores. > Would it make sense to make it required? Hmm, I fear that this model is used by too many tests to make such a fundamental change. If you want to test that, can't you add a new EClass in one of the other models? In the meantime you may commit this patch.
Committed in revision 7731
Available in R20110608-1407