Have the option to disable id marshalling in Hibernate integration, and change default to not perform it. See more here:
http://forum.compass-project.org/thread.jspa?threadID=215229
. Some text from the thread:
Thanks to the full stack trace I understand now what happens. Compass actually easily supports such mappings, but with the Hibernate integration, what happens is that the Hibernate listener takes the id from Hibernate and marshalls that into the object using Compass mappings. I had to do this due to the fact that Hibernate was not initializing the ids of the object during that stage in the event listener.
Now, things fails since there is a difference between the id mappings in Compass and in Hibernate.
As far as I remember, I believe Hibernate fixed this in recent versions. I will add a flag that will allow to disable this behavior in Hibernate, and I even consider defaulting this to not perform this id operations.