java


Convert a SQL type into something else in Speedment


When Speedment generates entities from a database schema, is there some way to change the default type being generated? For an example, if I have a table like this:
create table comment (
id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
author_name VARCHAR(40) NOT NULL,
posted_date TIMESTAMP NOT NULL
);
By default Speedment will generate the TIMESTAMP column as java.sql.Timestamp. Can I make it so that TIMESTAMP columns are converted into Java long values instead?
In the Tool, select the "posted_date"-column on the left side and change the "Type Mapper" property to "Timestamp to Long". When you regenerate the code, then that column will be represented as a long instead.
If you want to create a custom type mapper, there is a good tutorial for that on the Speedment GitHub page.

Related Links

SpringDataNeo4j-4: BeforeSaveEvent doesn't invoked on nested entities
Image proportions in android studio
Recursive function in While loop-java
#ElementCollection vs #Enumerated(EnumType.STRING), and how to decide it my enum is an entity
Getting all music files
Hadoop: getting container launched failed error
Java - Failed to Merge File from chunked files
Loading image using Picasso showing colors in corners
How to correctly use the visitor pattern with different Shapes for an Editor
how to stretch columns in JTable by content? [duplicate]
How to keep some Strings in a text file?
Setting an array of objects and searching through it for variables
How can I get Eclipse to find my .txt file in java ON A MAC? [duplicate]
Xpath insert sequence of nodes under a node - Java
How can I prevent a CodenameOne GUI Element from scrolling (tickering?) when it changes to Bold?
Convert time to seconds and then convert it back to hours (JAVA)

Categories

HOME
testng
gerrit
c#-4.0
gremlin
heroku
bpmn
webstorm
android-4.4-kitkat
kalman-filter
cvs
filtering
sharepoint-designer
dxl
webpack-2
retrofit
opengl-es-2.0
convolution
networkx
indesign
windows-10-universal
wheelnav.js
visual-studio-2005
ibm-odm
msp430
excel-vba-mac
lucene.net
java-3d
kudan
telerik-reporting
web-api-testing
key-value-observing
galsim
typed.js
cloud-code
mapdb
host
x11-forwarding
xenforo
pdf-reactor
grid.mvc
jvm-languages
arena-simulation
node-sass
chain-builder
dds
dandelion
gabor-filter
colorama
forever
cudafy.net
spring-cache
dwscript
django-scheduler
url-pattern
slicknav
home-directory
login-control
google-web-starter-kit
contact-list
whois
spim
google-places
comobject
muse
interrupted-exception
apache-commons-fileupload
angular-local-storage
p2
graph-api-explorer
umbraco6
pick
xc16
java.util.concurrent
xceed-datagrid
poller
algebraic-data-types
dataservice
easy-install
html-editor
cassini-dev
anonymous-methods
viewswitcher
stage
qt-jambi
datareader
firefox-5
anti-piracy
defensive-programming
msdev

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App