You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Michael Dick (JIRA)" <ji...@apache.org> on 2010/09/11 00:46:33 UTC
[jira] Resolved: (OPENJPA-1788) Problem in Firebird 2.1 with
sequence creation
[ https://issues.apache.org/jira/browse/OPENJPA-1788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick resolved OPENJPA-1788.
-----------------------------------
Fix Version/s: 2.1.0
Resolution: Fixed
> Problem in Firebird 2.1 with sequence creation
> -----------------------------------------------
>
> Key: OPENJPA-1788
> URL: https://issues.apache.org/jira/browse/OPENJPA-1788
> Project: OpenJPA
> Issue Type: Bug
> Components: jdbc
> Affects Versions: 2.0.0, 2.0.1, 2.0.2
> Environment: FirebirdSQL 2.1.3
> jaybird 2.1.6
> Reporter: Diego Cattelan
> Assignee: Michael Dick
> Fix For: 2.1.0
>
>
> Create a simple entity
> @Entity
> public class ana_anagrafica implements Serializable {
> private static final long serialVersionUID = 1L;
> private Long id;
> @SequenceGenerator(name="ANA_ANAGRAFICA_GEN")
> @Id
> @GeneratedValue(strategy = GenerationType.SEQUENCE,generator="ANA_ANAGRAFICA_GEN")
> public Long getId() {
> return id;
> }
> public void setId(Long id) {
> this.id = id;
> }
> }
> in the sequence creation the SQL returned from FirebirdDictionary is wrong,
> method
> @Override
> protected String getSequencesSQL(DBIdentifier schemaName, DBIdentifier sequenceName) {
> StringBuilder buf = new StringBuilder(sequenceSQL);
> if (sequenceName != null)
> buf.append(sequenceNameSQL);
> return buf.toString();
> }
> should be
> @Override
> protected String getSequencesSQL(DBIdentifier schemaName, DBIdentifier sequenceName) {
> StringBuilder buf = new StringBuilder(sequenceSQL);
> if(!DBIdentifier.isNull(sequenceName)){
> buf.append(sequenceNameSQL);
> }
> return buf.toString();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.