You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by minisoft_rm <mi...@hotmail.com> on 2016/05/07 15:25:06 UTC

trouble about Underscore and Boolean

dear experts, I meet troubles that very boring :
trouble 1:
I noticed that ignite generates fields without underscore... i.e. remove it
if my table column :
p_baseprice -> pBaseprice

trouble2:
ignite treats int(1) as Boolean.... how to indicate it as just integer???


please confirm if ignite is doing the above things.... and how to change
them? I actually modified pBaseprice back to p_baseprice manually.(so
boring...)

but, after I change Boolean to integer. the starting ignite server process
throws exception.

I am in mess at all. please clarify if manual changes(from Boolean to
Integer) work?  i am modifying the "ServerConfigurationFactory.java" of
course.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: trouble about Underscore and Boolean

Posted by Vasiliy Sisko <vs...@gridgain.com>.
Hello @minisoft_rm

TINYINT is returned as java.lang.Boolean if the configuration property
tinyInt1isBit is set to true (the default) and the storage size is 1, or
java.lang.Integer if not.

See table 5.2 on MySQL documentation page:
https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-type-conversions.html




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840p4851.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: trouble about Underscore and Boolean

Posted by minisoft_rm <mi...@hotmail.com>.
Hi Alexey, how is this issue going? could you share some updates for me?
thanks~



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840p4850.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: trouble about Underscore and Boolean

Posted by minisoft_rm <mi...@hotmail.com>.
thanks your help. please refer to the following table schema:(you
see...tinyint(1) columns are treated as Boolean :-( )

-- MySQL dump 10.13  Distrib 5.6.25, for osx10.8 (x86_64)
--
-- Host: localhost    Database: h5700ignite
-- ------------------------------------------------------
-- Server version	5.6.25

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `cartentries`
--

DROP TABLE IF EXISTS `cartentries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cartentries` (
  `hjmpTS` bigint(20) DEFAULT NULL,
  `createdTS` datetime(6) DEFAULT NULL,
  `modifiedTS` datetime(6) DEFAULT NULL,
  `TypePkString` bigint(20) DEFAULT NULL,
  `OwnerPkString` bigint(20) DEFAULT NULL,
  `PK` bigint(20) NOT NULL DEFAULT '0',
  `p_baseprice` decimal(30,8) DEFAULT NULL,
  `p_calculated` tinyint(1) DEFAULT NULL,
  `p_discountvaluesinternal` text COLLATE utf8_bin,
  `p_entrynumber` int(11) DEFAULT NULL,
  `p_info` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `p_product` bigint(20) DEFAULT NULL,
  `p_quantity` decimal(30,8) DEFAULT NULL,
  `p_taxvaluesinternal` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `p_totalprice` decimal(30,8) DEFAULT NULL,
  `p_unit` bigint(20) DEFAULT NULL,
  `p_giveaway` tinyint(1) DEFAULT NULL,
  `p_rejected` tinyint(1) DEFAULT NULL,
  `p_order` bigint(20) DEFAULT NULL,
  `p_chosenvendor` bigint(20) DEFAULT NULL,
  `p_deliveryaddress` bigint(20) DEFAULT NULL,
  `p_deliverymode` bigint(20) DEFAULT NULL,
  `p_nameddeliverydate` datetime(6) DEFAULT NULL,
  `p_quantitystatus` bigint(20) DEFAULT NULL,
  `p_deliverypointofservice` bigint(20) DEFAULT NULL,
  `aCLTS` bigint(20) DEFAULT '0',
  `propTS` bigint(20) DEFAULT '0',
  PRIMARY KEY (`PK`),
  KEY `oeProd_44` (`p_product`),
  KEY `oeOrd_44` (`p_order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2016-05-08  0:54:17




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840p4842.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: trouble about Underscore and Boolean

Posted by Alexey Kuznetsov <ak...@gridgain.com>.
Hi!

Are you talking about Schema Import Utility?

If yes, then it is expected behaviour. Schema Import Utility generates
POJOs using java naming convention.

To overcome this you may use query fields aliases.
But Schema Import Utility with this option (checkbox on UI) will be
available in upcoming 1.6 release, or
you could use latest nightly build from master. You could use only Schema
Import Utility from nightly build
 and you app may remain on version you are using.

About your second problem - could you provide a name of your RDBMs and
table script?
We will try to reproduce and fix.

Hope this help.

On Sat, May 7, 2016 at 10:25 PM, minisoft_rm <mi...@hotmail.com>
wrote:

> dear experts, I meet troubles that very boring :
> trouble 1:
> I noticed that ignite generates fields without underscore... i.e. remove it
> if my table column :
> p_baseprice -> pBaseprice
>
> trouble2:
> ignite treats int(1) as Boolean.... how to indicate it as just integer???
>
>
> please confirm if ignite is doing the above things.... and how to change
> them? I actually modified pBaseprice back to p_baseprice manually.(so
> boring...)
>
> but, after I change Boolean to integer. the starting ignite server process
> throws exception.
>
> I am in mess at all. please clarify if manual changes(from Boolean to
> Integer) work?  i am modifying the "ServerConfigurationFactory.java" of
> course.
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/trouble-about-Underscore-and-Boolean-tp4840.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com