Tuesday, June 1, 2010

Intertype Declaration Name Preservation

In the last article about AspectJ Intertype Declaration and its interplay with JPA, I complained on how the inconvenience of intertype declaration for a system like JPA. The inconvenience is due to the naming of the field that results to something scary like: AJC$INTERFIELD$COM_SCATLING_PERSITENCE_PERSISTENTASPECT$ID .  Good news is in the latest version of AspectJ (1.6.9), the name of intertyped declaration is preserved. Instead of the scarry AJC thing, we got: Id. 




I made a test using 1.6.9RC2 and removed the @Column(name="ID"), and instead having this:
@Id private int Flight.id; 


And yes, it works. That's great achievement from AspectJ. 


No comments: