Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 250006 - Access Patch: GenerationType.IDENTITY (autonumber) not supported
Summary: Access Patch: GenerationType.IDENTITY (autonumber) not supported
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: submitted_patch
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-07 14:29 EDT by Robert Flaherty CLA
Modified: 2022-06-09 10:35 EDT (History)
2 users (show)

See Also:
peter.krogh: iplog+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Flaherty CLA 2008-10-07 14:29:17 EDT
Build ID: 1.0.1

Steps To Reproduce:
I added the following to AccessPlatform.java:

    /**
     * INTERNAL:
     * Build the identity query for native sequencing.
     */
    public ValueReadQuery buildSelectQueryForIdentity() {
        ValueReadQuery selectQuery = new ValueReadQuery();
        StringWriter writer = new StringWriter();
        writer.write("SELECT @@IDENTITY");
        selectQuery.setSQLString(writer.toString());
        return selectQuery;
    }
    /** Append the receiver's field 'identity' constraint clause to a writer.*/
    public void printFieldIdentityClause(Writer writer) throws ValidationException {
        try {
            writer.write(" COUNTER");
        } catch (IOException ioException) {
            throw ValidationException.fileError(ioException);
        }
    }
    /**
     *  INTERNAL:
     *  Indicates whether the platform supports identity.
     *  Sybase does through IDENTITY field types.
     *  This method is to be used *ONLY* by sequencing classes
     */
    public boolean supportsIdentity() {
        return true;
    }
	
    public void printFieldTypeSize(Writer writer, FieldDefinition field, 
            FieldTypeDefinition fieldType, boolean shouldPrintFieldIdentityClause) throws IOException {
        if(!shouldPrintFieldIdentityClause) {
            super.printFieldTypeSize(writer, field, fieldType, shouldPrintFieldIdentityClause);
        }
    }
    
    public void printFieldUnique(Writer writer,  boolean shouldPrintFieldIdentityClause) throws IOException {
        if(!shouldPrintFieldIdentityClause) {
            super.printFieldUnique(writer, shouldPrintFieldIdentityClause);
        }
    }


More information:
Comment 1 Peter Krogh CLA 2009-06-17 09:59:56 EDT
Checked patch proposal into trunk.
Comment 2 Peter Krogh CLA 2009-08-26 09:45:03 EDT
Mass update to change fixed in target.
Comment 3 Peter Krogh CLA 2009-08-26 09:47:29 EDT
Mass update to change fixed in target.
Comment 4 Peter Krogh CLA 2009-08-26 09:51:33 EDT
Mass update to change fixed in target.
Comment 5 Peter Krogh CLA 2009-08-26 09:54:01 EDT
Mass update to change fixed in target.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:35:07 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink