-
1. Re: Handling of custom UserTypes
plaky Aug 22, 2008 6:17 AM (in response to klercker)Hello,
you can find the typemapping in org.jboss.envers.metadata.VersionsMetadataGenerator.
I'm not really familiar with the property and type-mapping, but I think you need to:
1.) Extends the method addProperties(..) to handle a UserType
2.) Build corresponding mappings for the user-type
3.) Build a mapper for this (every) user-type to track changes on this object
Maybe more changes are needed, this is only what I found during work on extending envers.
Kind regards,
Sebastian -
2. Re: Handling of custom UserTypes
adamw Aug 22, 2008 8:33 AM (in response to klercker)Hello,
I think for most user types it would be sufficient to generate a mapping exactly as in VersionsMetadataGenerator.addSimpleProperty, but additionally copying the user-type attribute. Please create a JIRA issue, and if you have some simple user type to test with please attach it as well, it surely will be helpful.
--
Adam -
3. Re: Handling of custom UserTypes
adepue Sep 26, 2008 5:49 PM (in response to klercker)Just in case you miss it from the issue itself, I've run into a problem during testing of the new feature: my custom type is being written to the DB OK, but it is not being read from the DB (or not being set on the entity). I'm still digging into it...
-
4. Re: Handling of custom UserTypes
adamw Sep 27, 2008 4:01 AM (in response to klercker)Ok, when you'll have some results, please let me know :).
The class org.jboss.envers.test.entities.customtype.CompositeTestUserType is based on your Money custom type, and in tests it works :) Maybe you can look there for differences.
--
Adam