[hibernate-dev] Strange sequence effect with ORM 5

2015-08-21 Thread Sanne Grinovero
Hi all, after upgrading Hibernate Search to Hibernate ORM 5.0.0.Final we noticed a small change in behaviour in sequences. In a single test we persist two entities of differnent types, Country and Address, and both types have the id mapped as follows: @Id @GeneratedValue Long id; Previo

Re: [hibernate-dev] Strange sequence effect with ORM 5

2015-08-21 Thread Steve Ebersole
Please see the migration guide and/or blogs :) Yes, we changed the default mapping for how id generators are mapped as discussed extensively on the mail list last month or earlier this month. Essentially we changed the default for `hibernate.id.new_generator_mappings` from false to true for 5.0.

Re: [hibernate-dev] Strange sequence effect with ORM 5

2015-08-21 Thread Sanne Grinovero
Ok, thanks and sorry I missed this :) I was aware that it would switch to sequences rather than identity, but I missed that there would be a single Sequence shared among types... I still find that a bit surprising as I would expect to generally want different sequences for each type. Thanks, Sanne

Re: [hibernate-dev] Strange sequence effect with ORM 5

2015-08-21 Thread Steve Ebersole
Well you can do that. Thats just not historically how Hibernate worked. Set `prefer_sequence_per_entity` to true On Fri, Aug 21, 2015 at 10:26 AM Sanne Grinovero wrote: > Ok, thanks and sorry I missed this :) > I was aware that it would switch to sequences rather than identity, > but I missed

Re: [hibernate-dev] Strange sequence effect with ORM 5

2015-08-21 Thread Steve Ebersole
Or, if you have *explicit* expectations you could, you know, explicitly define them :) On Fri, Aug 21, 2015 at 10:30 AM Steve Ebersole wrote: > Well you can do that. Thats just not historically how Hibernate worked. > > Set `prefer_sequence_per_entity` to true > > On Fri, Aug 21, 2015 at 10:26

Re: [hibernate-dev] Hibernate ORM SQL generation

2015-08-21 Thread Steve Ebersole
http://www.antlr2.org/article/1170602723163/treewalkers.html Not sure if y'all have seen this. Its an old article advocating manual tree walking (what we are facing here) over using generated tree walkers. On Wed, Aug 19, 2015 at 12:27 PM Steve Ebersole wrote: > I agree. Its my biggest hang

Re: [hibernate-dev] Hibernate ORM SQL generation

2015-08-21 Thread andrea boriero
I haven't seen it, I'm going to read it. On 21 August 2015 at 16:54, Steve Ebersole wrote: > http://www.antlr2.org/article/1170602723163/treewalkers.html > > Not sure if y'all have seen this. Its an old article advocating manual > tree walking (what we are facing here) over using generated tree

Re: [hibernate-dev] Hibernate ORM SQL generation

2015-08-21 Thread Steve Ebersole
Just a heads up that I started a major refactoring of the antlr4 poc project in preparation for starting to look at this next sql-gen step. First I am making it into a multi-module project. We will have the hql-parser module, but then also an orm-sql-gen module to be able to play with that part.