Workbook 4 delta

Exercise 6.1: Basic Property Mappings

The Customer entity had to be severely updated because of 1 or 2 bugs in the Sun Application Server.

Bug number 1 is in the ORB used by the application server, interacting with the way enumerated types are persisted. The ORB will actually return a new instance of an enumerated value, instead of the existing value already present. This is solved by changing the get method.

Bug number 2 is that the database connection does not (de)serialize objects. This has been mitigated by marking the orignal JPEG value as @Transient, and (de)serialize the object inside a getter and setter meant for persistence only. This clearly is not as elegant as when the persistence layer would have executed this.

Exercise 6.3: @EmbeddedId

For some reason @AttributeOverrides does not work for EmbeddedId, it does work for @Embedded (exercise 6.5).

Back to the index Further to Workbook 5

UUIDs and information about UUIDs
If you have improvements, contact information on the homepage of this host.
The uptime of this host

Search for more information :