You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Michael Gentry (JIRA)" <ji...@apache.org> on 2018/06/16 11:24:00 UTC

[jira] [Commented] (CAY-2441) No puedo insertar un texto AES-256 en Columna MySQL BLOB desde Cayenne

    [ https://issues.apache.org/jira/browse/CAY-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16514755#comment-16514755 ] 

Michael Gentry commented on CAY-2441:
-------------------------------------

Hi, please see attached screenshot.  You need to quote SQL identifiers in Cayenne Modeler because 'desc' is a reserved SQL keyword or rename your 'desc' column.  If this doesn't resolve your issue, please re-open this ticket.

Hola, mira la captura de pantalla adjunta. Debe citar los identificadores de SQL en Cayenne Modeler porque 'desc' es una palabra clave SQL reservada o cambie el nombre de su columna 'desc'. Si esto no resuelve su problema, vuelva a abrir este ticket.

 

> No puedo insertar un texto AES-256 en Columna MySQL BLOB desde Cayenne
> ----------------------------------------------------------------------
>
>                 Key: CAY-2441
>                 URL: https://issues.apache.org/jira/browse/CAY-2441
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Database integration
>    Affects Versions: 4.0.RC1
>         Environment: JSF2.0, Payara Server 4.1.2.174, JDK 7, MySQL5.6.38
>            Reporter: Fernando Perez
>            Priority: Major
>         Attachments: screenshot_06.png
>
>
> Hola, al tratar de guardar una contraseña AES-256 en MySQL me manda el siguiente error:
> INFORMACIÓN: *** error.
>  com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, password, target, type_idtype, user) VALUES ('', x'4F38726A5574395A6C4C384' at line 1
> Insersión:
> INFORMACIÓN: INSERT INTO passwords.password (desc, password, target, type_idtype, user) VALUES (?, ?, ?, ?, ?)
>  INFORMACIÓN: [bind: 1->desc:'', 2->*password:'O8rjUt9ZlL8Mybz7B8O/5w=='*, 3->target:'192.168.15.15', 4->type_idtype:1, 5->user:'nando']
> Tabla en Base de Datos:
> CREATE TABLE `password` (
>  `idpassword` int(11) NOT NULL AUTO_INCREMENT,
>  `user` varchar(45) COLLATE utf8_spanish_ci NOT NULL,
>  `password` blob NOT NULL,
>  `target` mediumtext COLLATE utf8_spanish_ci NOT NULL,
>  `desc` mediumtext COLLATE utf8_spanish_ci,
>  `type_idtype` int(11) NOT NULL,
>  PRIMARY KEY (`idpassword`),
>  KEY `fk_password_type1_idx` (`type_idtype`),
>  CONSTRAINT `fk_password_type1` FOREIGN KEY (`type_idtype`) REFERENCES `type` (`idtype`) ON DELETE NO ACTION ON UPDATE NO ACTION
>  ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;
> Usando *SQLTemplate* y Consola SQL guarda bien, pero no puedo obtener el ID del registro insertado para usarlo con el elemento padre.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)