You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Taiarol, Felipe" <fe...@sap.com> on 2014/05/13 14:51:28 UTC
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:image004.png@01CF6B9C.D0A6DB60]
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:image001.png@01CF6B9A.7AA84F20]
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:image003.png@01CF6B9A.7AA84F20][cid:image002.png@01CF6B9A.7AA84F20]
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
RE: Contributing to Olingo
Posted by "V.A, Chandan" <ch...@sap.com>.
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:felipe.taiarol@sap.com]
Sent: Wednesday, May 14, 2014 2:14 AM
To: dev@olingo.apache.org
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:chandan.v.a@sap.com]
Sent: terça-feira, 13 de maio de 2014 12:40
To: dev@olingo.apache.org
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:felipe.taiarol@sap.com]
Sent: Tuesday, May 13, 2014 6:21 PM
To: dev@olingo.apache.org
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:image004.png@01CF6B9C.D0A6DB60]
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:image001.png@01CF6B9A.7AA84F20]
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:image003.png@01CF6B9A.7AA84F20][cid:image002.png@01CF6B9A.7AA84F20]
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
RE: Contributing to Olingo
Posted by "Taiarol, Felipe" <fe...@sap.com>.
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:chandan.v.a@sap.com]
Sent: terça-feira, 13 de maio de 2014 12:40
To: dev@olingo.apache.org
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:felipe.taiarol@sap.com]
Sent: Tuesday, May 13, 2014 6:21 PM
To: dev@olingo.apache.org
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:image004.png@01CF6B9C.D0A6DB60]
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:image001.png@01CF6B9A.7AA84F20]
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:image003.png@01CF6B9A.7AA84F20][cid:image002.png@01CF6B9A.7AA84F20]
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
RE: Contributing to Olingo
Posted by "V.A, Chandan" <ch...@sap.com>.
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:felipe.taiarol@sap.com]
Sent: Tuesday, May 13, 2014 6:21 PM
To: dev@olingo.apache.org
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:image004.png@01CF6B9C.D0A6DB60]
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:image001.png@01CF6B9A.7AA84F20]
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:image003.png@01CF6B9A.7AA84F20][cid:image002.png@01CF6B9A.7AA84F20]
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
Re: Contributing to Olingo
Posted by "Klevenz, Stephan" <st...@sap.com>.
Welcome Felipe!
Starting with contribution is quite simple. If you find a new bug then you can create a Jira issue for the Olingo project here:
https://issues.apache.org/jira/browse/OLINGO
If you want to contribute a fix for this bug then you can attach a patch to the issue. One of the committers will pick it up and commit to the source repository if it is accepted.
Is this applicable to you?
Greetings,
Stephan
PS.: Just as hint, Apache mailing lists do not accept attachments. The images within you mail are not shown. At least not to me.
From: <Taiarol>, Felipe <fe...@sap.com>>
Reply-To: "dev@olingo.apache.org<ma...@olingo.apache.org>" <de...@olingo.apache.org>>
Date: Dienstag, 13. Mai 2014 14:51
To: "dev@olingo.apache.org<ma...@olingo.apache.org>" <de...@olingo.apache.org>>
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:image004.png@01CF6B9C.D0A6DB60]
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:image001.png@01CF6B9A.7AA84F20]
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:image003.png@01CF6B9A.7AA84F20][cid:image002.png@01CF6B9A.7AA84F20]
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