Skip to content

ORACLE insert bug #94

Description

@clearcodecn

Question: When insert a column reports error:

sql: expected 0 arguments, got 6"

and I checked the code

       -  session_insert.go:341
	if session.engine.dialect.URI().DBType == schemas.ORACLE && len(table.AutoIncrement) > 0 {
		res, err := session.queryBytes("select seq_atable.currval from dual", args...)  
		if err != nil {
			return 0, err
		}
         ....

the args here is my insert arguments. like sess.Insert(bean), so when u query "select seq_atable.currval from dual" with args it reports an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions