karishma-tirthani / odata4j

Automatically exported from code.google.com/p/odata4j
0 stars 0 forks source link

Provide support for @Embeddable/@Embedded attributes for non-key types. #85

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Currently odata4j supports the javax.persistence @Embedded attribute for key 
types only. If, for example, you needed to have an embedded address property on 
a customer class you can't. The ability to use @Embeddable and @Embedded would 
be very useful and allow us to model our business domain the way we would like.

What version of the product are you using? On what operating system?
odata4j-0.4 on Linux & Mac OSX

Original issue reported on code.google.com by re...@therobinsons.gen.nz on 31 Oct 2011 at 10:43

GoogleCodeExporter commented 8 years ago
Here is a patch for version 0.7 for reading operations on entities containing 
embeddables. I have not tested editing nor creating new entities. Supports 
nested embeddables. Doesn't support relationships (navigation properties) 
stemming from embeddables, but even without the fix, the service's metadata 
don't expose such properties. In other words, it supports exactly the 
embeddables as exposed by the original odata4j in the service's metadata.

Original comment by emmanuel...@gmail.com on 21 Sep 2012 at 10:06

Attachments:

GoogleCodeExporter commented 8 years ago
For your convenience, here is the set of my patches for version 0.7 up to now 
addressing the following issues:

85  Provide support for @Embeddable/@Embedded attributes for non-key types.
133 JPAProducer: enums not suported
219 $expand broke in version 0.7 with JPAProducer 

My changes are marked with comments containing "Liossis:".

Original comment by emmanuel...@gmail.com on 21 Sep 2012 at 10:17

Attachments:

GoogleCodeExporter commented 8 years ago
PS. All the above are tested only in 'read' scenarios.

Original comment by emmanuel...@gmail.com on 21 Sep 2012 at 10:25

GoogleCodeExporter commented 8 years ago
All the above are now packed as a pull request.
https://github.com/odata4j/odata4j/pull/3

Original comment by emmanuel...@gmail.com on 22 Aug 2014 at 2:33