[JIRA] Commented: (ACTIVERECORD_JDBC-88) tinyint to boolean conversion fails with mysql jndi pool
- From: "Igor Minar (JIRA)" <jira-no-reply@kenai.com>
- To: issues@activerecord-jdbc.kenai.com
- Subject: [JIRA] Commented: (ACTIVERECORD_JDBC-88) tinyint to boolean conversion fails with mysql jndi pool
- Date: Thu, 21 Jan 2010 21:33:51 +0000 (GMT+00:00)
[
http://kenai.com/jira/browse/ACTIVERECORD_JDBC-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46791#action_46791
]
Igor Minar commented on ACTIVERECORD_JDBC-88:
---------------------------------------------
Yeah, that does fix the issue. For some reason in the older AR-JDBC version
"jdbc" worked fine. I'll update my config.
It would help if a jndi config example was part of the examples on the wiki.
Thanks!
> tinyint to boolean conversion fails with mysql jndi pool
> --------------------------------------------------------
>
> Key: ACTIVERECORD_JDBC-88
> URL: http://kenai.com/jira/browse/ACTIVERECORD_JDBC-88
> Project: activerecord-jdbc
> Issue Type: Bug
> Components: MySQL
> Affects Versions: 0.9.2
> Reporter: Igor Minar
>
> Recently I upgrade from activerecord 0.9 to 0.9.2 and from rails 2.2.2 to
> rails 2.3.5 and noticed a regression in the app.
> I have a model with a boolean field:
> {code}
> t.boolean "foo", :limit => nil, :default => true, :null => false
> {code}
> in the db it looks like:
> {code}
> `foo` tinyint(1) NOT NULL default '1',
> {code}
> before, when retrieving model with this field, I would get true or false
> back as the value, but now I get "0" or "1", which breaks many things in my
> app.
> The odd thing is that this happens only when I hook up my app to with the
> db via a connection pool exposed via jndi. If I connect to the db directly,
> everything works.
> My config:
> database.yml:
> {code}
> production:
> adapter: jdbc
> jndi: jdbc/mydb
> {code}
> connection pool config in domain.xml of glassfish:
> {code}
> <jdbc-connection-pool validation-table-name="users"
>
> datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource"
>
> max-pool-size="128" res-type="javax.sql.ConnectionPoolDataSource"
> name="mydb" ping="true">
> <property name="user" value="myuser" />
> <property name="url" value="jdbc:mysql://mydb:3307/myapp_production?
>
> autoReconnect=true&relaxAutoCommit=true&useUnicode=true&characterEncoding=utf8"
> />
> <property name="password" value="xxxxxx" />
> </jdbc-connection-pool>
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://kenai.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
[JIRA] Created: (ACTIVERECORD_JDBC-88) tinyint to boolean conversion fails with mysql jndi pool |
Igor Minar (JIRA) | 01/21/2010 |
|
[JIRA] Commented: (ACTIVERECORD_JDBC-88) tinyint to boolean conversion fails with mysql jndi pool |
Nick Sieger (JIRA) | 01/21/2010 |
|
[JIRA] Commented: (ACTIVERECORD_JDBC-88) tinyint to boolean conversion fails with mysql jndi pool |
Igor Minar (JIRA) | 01/21/2010 |
|
[JIRA] Commented: (ACTIVERECORD_JDBC-88) tinyint to boolean conversion fails with mysql jndi pool |
Nick Sieger (JIRA) | 01/21/2010 |
|
[JIRA] Commented: (ACTIVERECORD_JDBC-88) tinyint to boolean conversion fails with mysql jndi pool |
Igor Minar (JIRA) | 01/21/2010 |





