Hello Felipe, You could attach the patch as an attachment to the JIRA issue that you have created. Secondly with respect to usage of library - https://github.com/atteo/evo-inflector I have few open points for discussion A) How fast is the dictionary search for a given Entity Name B) What if the Entity Name is not an English word C) License details for using the library.
I personally feel that using the Mapping XML would give better flexibility when it comes to handling language specific words and also will not require a dictionary search. Thanks, Kind Regards Chandan VA -----Original Message----- From: Taiarol, Felipe [mailto:[email protected]] Sent: Wednesday, May 14, 2014 2:14 AM To: [email protected] Subject: RE: Contributing to Olingo Hello Chandan, I tried with eclipselink 2.5.1 and the error is still there. After some debugging I realized my JPA annotations were wrong. I had a field annotated with @OneToMany and @JoinColumn. When I fixed this issue it worked with both eclipselink 2.5.1 and 2.5.0. Regarding the JPANameBuilder, I didn't know it was possible to override the naming, thanks for showing me that. Even though you can override it I think it would be nice if the correct plural name was proposed by default. I have already created a low priority issue for that: https://issues.apache.org/jira/browse/OLINGO-283 and now I am trying to figure out how I can attach a patch to the issue. Maybe you can show me how to do that ? Thanks, Felipe -----Original Message----- From: V.A, Chandan [mailto:[email protected]] Sent: terça-feira, 13 de maio de 2014 12:40 To: [email protected] Subject: RE: Contributing to Olingo Hello Felipe, Refer to - [1] for your first issue. I hope the JIRA link provides a solution to the problem. Secondly the JPANameBuilder.java just proposes a name (unique) for the OData entityset. You could override the naming as explained here [2]. [1] - https://issues.apache.org/jira/browse/OLINGO-97 [2] - http://olingo.apache.org/doc/tutorials/jparedefinemetadata.html Thanks, Kind Regards Chandan VA From: Taiarol, Felipe [mailto:[email protected]] Sent: Tuesday, May 13, 2014 6:21 PM To: [email protected] Subject: Contributing to Olingo Hi All, I work in the SAP Cloud Custom Development and we will probably start using Olingo in future projects. I would like to start contributing to the Olingo project and eventually become a committer. I cloned the git repository https://git-wip-us.apache.org/repos/asf/olingo-odata2 and started playing around with Olingo. First thing I noticed is that there is bug when you try to create an OData service for a JPA entity which has an OneToMany relationship. This is the error you get: [cid:[email protected]] I found out this happens because jpaAttribute.getJavaType() return java.util.List which is not an entity. I guess the list generic type should be passed as parameter instead ? org.apache.olingo.odata2.jpa.processor.core.model.JPAEdmProperty [cid:[email protected]] This was working in version 1.0.0 so I don't know if you are already aware of that or if this is happening because of some code restructuring or something but I think it doesn't hurt to point that out. :) The second thing I noticed is that when the OData entities are created from the JPA entities Olingo just adds an "s" at the end of the name. I modified the class org.apache.olingo.odata2.jpa.processor.core.access.model.JPAEdmNameBuilder using the this library https://github.com/atteo/evo-inflector and now the entities are created using the correct plural name. [cid:[email protected]][cid:[email protected]] I never particpated in an open source project before so I am not really sure how it works. Is this a desirable change ? Can I commit it ? Best regards, Felipe
