-
1. Re: @Unversioned once again
adamw Aug 28, 2008 6:30 AM (in response to morman)Hello,
so, if I understand you right, you'd like to @Unversion all relations, which are between a versioned and non-versioned entities? Because if an entity isn't marked as @Versioned, then of course Envers won't even consider it.
Maybe a configuration option would be a good idea? Create a JIRA :)
Adam -
2. Re: @Unversioned once again
morman Aug 28, 2008 7:24 AM (in response to morman)Configuration option may be a good idea, but it is worth of consideration if it is truly required to throw an exception if such relationship is found.
JIRA created :) -
3. Re: @Unversioned once again
nikodc Sep 2, 2008 9:29 AM (in response to morman)What about some kind of "mappingExceptionOnRelationToNonVersioned" configuration property which by default is "false". I think that what Michal says is right and disabling the MappingException in general is the better approach. However I found it could be interesting to have the possibility to configure Envers to have the current behavior. For example, during development time, the Exception throwing strategy could be useful to easily detect references to unversioned entities in projects where the vast majority of the entities is supposed to be versioned. Suppose you add a new entity but forget about the @Versioned annotation.
-
4. Re: @Unversioned once again
adamw Sep 3, 2008 6:32 AM (in response to morman)Hello,
yes, I also think that a property is the best solution. Especially for the use case you describe :).
The JIRA issue is https://jira.jboss.org/jira/browse/ENVERS-45
Adam -
5. Re: @Unversioned once again
chris.simons Dec 29, 2008 12:45 PM (in response to morman)
I also think this would be a great idea; a property in persistence.xml, for example, to disable versioning of relationships by default.
I agree, the exceptions are kind of a pain - esp. when applying Envers to a bunch of entities. -
6. Re: @Unversioned once again
adamw Dec 30, 2008 2:04 AM (in response to morman)Then go ahead and vote for the issue :)
--
Adam -