-
1. Re: User type in EmbeddedId
slawekgarwol Feb 8, 2010 7:11 AM (in response to slawekgarwol)I looked into IdMetadataGenerator:
if (propertyType instanceof ImmutableType) {
Why you are doing this??? If you want to ensure that type is immutable jus invoke propertyType.isMutable(). In current implementation I cannot use any userType in id
Slawek
-
2. Re: User type in EmbeddedId
adamw Feb 8, 2010 7:40 AM (in response to slawekgarwol)Hello,
I'm not quite sure (I know, a comment would be useful), but I guess I wanted a way to ensure that the types used in the id are not mutable. And it worked until your use-case . Of course your check should be used. Could you maybe do a patch with a unit test and contribute it to Envers?
This could also probably solve http://community.jboss.org/message/524150#524150
Adam
-
3. Re: User type in EmbeddedId
slawekgarwol Feb 8, 2010 7:45 AM (in response to adamw)Sure, I'll send you a patch.
But this won't solve problem with TimestampType because:
public class TimestampType extends MutableType
-
4. Re: User type in EmbeddedId
adamw Feb 8, 2010 7:57 AM (in response to slawekgarwol)Great, just attach it to a Jira issue and I'll take it from there.
I wonder why timestamp is a mutable type. It would seem that it's as immutable as long, but probably there's some reason behind this . I'll have to take a deeper look into this then.
Thanks,
Adam
-
5. Re: User type in EmbeddedId
mhaefele Nov 8, 2010 12:55 PM (in response to adamw)Hi, I'm a little late to the game here, but is there a JIRA to follow on this or a suggested patch?
I'm using version 1.2.2.GA-hibernate-3.3.
Thanks,
Mike
-
6. Re: User type in EmbeddedId
mhaefele Nov 8, 2010 3:00 PM (in response to mhaefele)Looks like i was a revision behind. 1.2.3-hibernate-3.3 seems to fix this particular issue.