[hibernate-dev] HHH-11699 Hibernate ignores 'schema' attribute of @SequenceGenerator for Oracle --- and SQL Server --- sequences

Jason Pyeron jpyeron at pdinc.us
Tue Apr 21 09:30:38 EDT 2020


I cleaned up the test case. My miss report of failure on the setting of false was due to other consequences of setting it to false (e.g. HHH-13939).

It does in fact create and use the correct schema when hibernate.id.new_generator_mappings=false . This does not feel like a fix, quoting https://docs.jboss.org/hibernate/stable/annotations/reference/en/html/ch01.html "We recommend all new projects to use hibernate.id.new_generator_mappings=true ... However they are not backward compatible with existing databases ..."

-Jason

> -----Original Message-----
> From: hibernate-dev-bounces at lists.jboss.org [mailto:hibernate-dev-bounces at lists.jboss.org]
> On Behalf Of Jason Pyeron
> Sent: Tuesday, April 21, 2020 8:58 AM
> To: hibernate-dev at lists.jboss.org
> Subject: Re: [hibernate-dev] HHH-11699 Hibernate ignores 'schema' attribute of
> @SequenceGenerator for Oracle --- and SQL Server --- sequences
> 
> Sorry, accidentally sent to Andrea and not the list.
> 
> 
> 
> From: Jason Pyeron [mailto:jpyeron at pdinc.us]
> Sent: Tuesday, April 21, 2020 8:56 AM
> To: 'andrea boriero' <andrea at hibernate.org>
> Subject: RE: [hibernate-dev] HHH-11699 Hibernate ignores 'schema' attribute of
> @SequenceGenerator for Oracle --- and SQL Server --- sequences
> 
> 
> 
> That then conflicts with HHH-13939.
> 
> 
> 
> Either way, no joy. Lastly, it should not have an effect on definitions like:
> 
> 
> 
>     @Id
> 
>     @Column(name = "sid")
> 
>     @GeneratedValue(generator = "SIGNATURE", strategy = GenerationType.SEQUENCE)
> 
>     @SequenceGenerator(name = "SIGNATURE", schema = "cresaptown", sequenceName =
> "signature_seq")
> 
>     Long sid;
> 
> 
> 
> -Jason
> 
> 
> 
> From: andrea boriero [mailto:andrea at hibernate.org]
> Sent: Tuesday, April 21, 2020 3:07 AM
> To: Jason Pyeron <jpyeron at pdinc.us <mailto:jpyeron at pdinc.us> >
> Subject: Re: [hibernate-dev] HHH-11699 Hibernate ignores 'schema' attribute of
> @SequenceGenerator for Oracle --- and SQL Server --- sequences
> 
> 
> 
> Hi Jason,
> 
> 
> 
> in the Jira I explained that the issue seems related to Spring setting the
> `hibernate.id.new_generator_mappings` value to false.
> 
> Have you tried to explicitly change this value to true?
> 
> 
> 
> Cheers,
> 
> 
> 
> Andrea
> 
> 
> 
> On Tue, 21 Apr 2020 at 03:57, Jason Pyeron <jpyeron at pdinc.us <mailto:jpyeron at pdinc.us> >
> wrote:
> 
> The issue is impacting current releases for both schema generation and runtime use.
> 
> 
> 
> I do not have permissions to update the title/summary.
> 
> 
> 
> -Jason
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org <mailto:hibernate-dev at lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev




More information about the hibernate-dev mailing list