Skip to main content
chrisg0006
October 15, 2024
Question

What is the columnDefinition in an XSD for a bigInt(21) field.

  • October 15, 2024
  • 3 replies
  • 0 views

I created a view in SQL to calculate the age of a person.  MariaDB is formating the age field as a bigint(21).  I am connecting an CDT to this view and I need to know what the columnDefinition would be for a big integer.  I tried INT and BIGINT and that doesn't work.


        
          @Column(name="Age", columnDefinition="INT")
        
      

I even tried to cast the calculated field as an integer in the SQL statement, but that did not work either?

CAST(TIMESTAMPDIFF(YEAR, `CM`.`ClergyDOB`,
              CASE
              WHEN `CM`.`ClergyDOD` IS NULL THEN CURDATE()
              ELSE `CM`.`ClergyDOD`
END
)
AS INT) AS `Age`, 

3 replies

mikes0011
Brainy
October 15, 2024

did you try LONG yet?

October 15, 2024
chrisg0006
October 15, 2024

So I just deleted the CDT and from the Data Store and recreated the table from the SQL view.  Evidently, BIGINT seems to work except for me it didn't.


        
          @Column(name="Age", columnDefinition="BIGINT")