Missing sequence or table on Oracle

Description

Here we use a user "project_web" to access a "dbproject" schema.
The problem is, when Hibernate looks for the sequences, it looks in the user_sequences, but my user (project_web) don't have any sequences.
The solving is: when getting the sequence names (org.hibernate.dialect.Oracle9Dialect .getQuerySequencesString) use that:
select SEQUENCE_NAME from all_sequences where SEQUENCE_OWNER='DBPROJECT'
i.e. use the schema to look in the all_sequences.

Sorry for the bad english.

package org.hibernate.dialect;
public class Oracle9Dialect extends Dialect {
public String getQuerySequencesString() {
return "select sequence_name from user_sequences";
}

@GeneratedValue(generator="sqCoSeqProjeto", strategy=GenerationType.SEQUENCE)
@SequenceGenerator(name="sqCoSeqProjeto", sequenceName="sq_coseqprojeto", allocationSize=5)

Environment

JBoss 4.0.5.GA, Using JBoss SEAM and Oracle 9i, EJB/JPA annotations

Status

Assignee

DiegoP

Reporter

André Fernandes

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major