[Hibernate-JIRA] Created: (HHH-7232) Hibernate ignores 'schema' attribute of @SequenceGenerator for Oracle sequences
by Scott Van Wart (JIRA)
Hibernate ignores 'schema' attribute of @SequenceGenerator for Oracle sequences
-------------------------------------------------------------------------------
Key: HHH-7232
URL: https://hibernate.onjira.com/browse/HHH-7232
Project: Hibernate ORM
Issue Type: Bug
Components: annotations
Affects Versions: 4.1.2
Environment: Hibernate 4.1.2.Final, Oracle 11gR2
Reporter: Scott Van Wart
I wrote a mapping for a sequence such as:
@SequenceGenerator( schema="jaseadm", name="applicantSignupSequence", sequenceName="seq_applicant_signup" )
And the generated SQL is as follows:
DEBUG org.hibernate.SQL - select seq_applicant_signup.nextval from dual
Which leads to this:
WARN o.h.e.jdbc.spi.SqlExceptionHelper - SQL Error: 2289, SQLState: 42000
ERROR o.h.e.jdbc.spi.SqlExceptionHelper - ORA-02289: sequence does not exist
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
[Hibernate-JIRA] Created: (HHH-6911) Write DiscriminatorValue to DiscriminatorColumn when combined with InheritanceType#JOINED
by Steve Ebersole (JIRA)
Write DiscriminatorValue to DiscriminatorColumn when combined with InheritanceType#JOINED
-----------------------------------------------------------------------------------------
Key: HHH-6911
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6911
Project: Hibernate Core
Issue Type: Improvement
Components: annotations, metamodel
Reporter: Steve Ebersole
Priority: Minor
The JPA spec states that {{DiscriminatorColumn}} can be used in conjunction with JOINED inheritence. The only section that seems to deal with this combination is _11.1.10 DiscriminatorColumn Annotation_ where it says
{quote}
For the SINGLE_TABLE mapping strategy, and typically also for the JOINED strategy, the persistence
provider will use a type discriminator column. The DiscriminatorColumn annotation is used to
define the discriminator column for the SINGLE_TABLE and JOINED inheritance mapping strategies.
{quote}
Apparently this is meant to imply that even if providers do not need/use the discriminator for concrete class resolution (reading) they are still expected to write it out to the database. Dunno, thats just what we have been told :)
Anyway, like I said, Hibernate itself does not need the discriminator column/value to interpret the concrete classes. However, in the interest of portability we certainly *could* write it out. Longer term
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months