https://kotlinlang.org logo
Docs
Join the conversationJoin Slack
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by Linen
exposed
  • a

    avolkmann

    04/12/2018, 1:55 PM
    How can we check if a ColumnSet already contains a Table?
    1 reply · 1 participant
  • j

    Johan Vergeer

    04/15/2018, 5:16 PM
    It seems it should be
    referrersOn
    , and I changed it in the Wiki so others can benefit.
    t
    1 reply · 2 participants
  • j

    Johan Vergeer

    04/16/2018, 3:50 PM
    Does anyone know how to implement many-to-many in Exposed?
    t
    1 reply · 2 participants
  • s

    spand

    04/23/2018, 7:12 AM
    Is that even possible in sql ?
    n
    t
    4 replies · 3 participants
  • a

    avolkmann

    04/23/2018, 11:14 AM
    But i can't use that in
    slice
    s
    8 replies · 2 participants
  • a

    avolkmann

    04/23/2018, 11:37 AM
    Another thing: when I use an
    Alias
    in a join, why does the
    referee
    disappear, causing an Exception
    s
    2 replies · 2 participants
  • s

    Smith

    04/27/2018, 2:11 PM
    Hey, is there a way to do a unique index across two columns?
    t
    1 reply · 2 participants
  • a

    Adrian M

    05/01/2018, 3:20 PM
    Has anyone tried using Exposed in Java?
    2 replies · 1 participant
  • k

    Kabbura

    05/07/2018, 9:23 AM
    Hey, we just started using exposed in production and it is amazing. One question though, is it possible to use db lock in exposed? e.g. Mysql SELECT ... LOCK IN SHARE MODE or Mysql SELECT ... FOR UPDATE?
    t
    1 reply · 2 participants
  • p

    Pere Casafont

    05/09/2018, 2:27 PM
    oh I just found https://github.com/JetBrains/Exposed/issues/43, so @tapac is there any recommended way to work this around? Just a primary generated id and 2 foreign keys for now?
    t
    2 replies · 2 participants
  • p

    Pere Casafont

    05/10/2018, 12:06 PM
    another question, are there any plans to change the time libs from joda to java8?
    t
    1 reply · 2 participants
  • e

    Evgeniy Zaharov

    05/11/2018, 10:11 AM
    Hi! Does it possible to explicitly choose columns to select from DAO object?
    t
    2 replies · 2 participants
  • m

    Marcin Wisniowski

    05/13/2018, 11:25 PM
    Hello, I can't find how to do a comparison ignoring case, currently my code inside a
    find()
    is
    Accounts.character eq character
    . How do I make this case insensitive?
    t
    2 replies · 2 participants
  • m

    Marcin Wisniowski

    05/14/2018, 5:51 PM
    I'm using the DAO API, and I want to find objects based on something they reference, for example:
    User.find { Users.city.name eq "London" }
    This doesn't work, because I cannot access properties of the
    city
    reference this way, what's the correct way? This could be normally solved with a join, but I can't find anything on joins with the DAO API. I'm struggling to find a way that doesn't involve loading all the users from the database just to filter them in application code.
    t
    2 replies · 2 participants
  • m

    Marcin Wisniowski

    05/17/2018, 12:01 AM
    This might be a stupid question, but is this code ok?
    User.find { Users.confirmed eq true }.sortedBy { it.loginTimestamp }.take(10)
    It works, but is it efficient or does it load all users from the database? I'm not sure if the limiting and sorting is done inside the database, or in my code, it looks like it's done in my code, but I want it to happen as part of the query.
    t
    2 replies · 2 participants
  • t

    Tristan Caron

    05/17/2018, 2:25 PM
    Hello, I'm trying to build a query for
    select count(distinct my_column) from my_table where my_other_column = true
    I have started the fellowing, but I don't know I can achieve what I would like
    MyTable.select {
      MyTable.myOtherColumn.eq(true)
    }.withDistinct().count()
    Any ideas?
    t
    4 replies · 2 participants
  • c

    Chris

    05/18/2018, 8:15 AM
    Hello, I am trying to make a very simple query against an oracle database but no matter what I try I get
    error occurred during batching: batch must be either executed or cleared
    . Is there something I am missing. This is all I have:
    Database.connect("jdbc:oracle:thin:@localhost:1521/xe", driver = "oracle.jdbc.OracleDriver",user = "XXXX", password = "XXXX")
        transaction(java.sql.Connection.TRANSACTION_READ_COMMITTED,1){
           PaymentOption.selectAll().forEach { println(it[PaymentOption.paymentPlanCode]) }
        }
    I am using Maven btw
    t
    2 replies · 2 participants
  • m

    Marcin Wisniowski

    05/22/2018, 3:56 PM
    Ok,
    logger.removeLogger(Slf4jSqlLogger)
    seems to work, but only for one transaction when put into that transaction.
    a
    6 replies · 2 participants
  • a

    Allan Wang

    05/22/2018, 4:16 PM
    Is there a DAO equivalent to the DSL insert ignore? Right now I have a helper function:
    fun <ID : Comparable<ID>, T : Entity<ID>> EntityClass<ID, T>.newOrUpdate(id: ID, update: T.() -> Unit): T {
        val existing = findById(id)
        return if (existing != null) existing.apply(update)
        else new(id, update)
    }
    But there is an unnecessary query if the entity isn't cached. This method aims to just end up with a new entity with the supplied id, regardless of whether it exists already
    ✅ 1
    t
    1 reply · 2 participants
  • o

    oshai

    05/30/2018, 6:22 AM
    Hi @tapac - we upgraded from exposed 9.0.1 to 10.0.2 and I think there is a memory leak. for example with 9.0.1 we have one instance of
    org.jetbrains.exposed.sql.vendors.MysqlDialect
    and with 10.0.2 we had 277725 instances when I took a memory dump. So it is either a leak or we are not using exposed as we should with the new version. Do you have an idea what can go wrong?
    t
    10 replies · 2 participants
  • d

    danielm

    05/30/2018, 9:49 AM
    what am I missing?
    t
    9 replies · 2 participants
  • d

    danielm

    05/31/2018, 2:03 PM
    Production
                    .innerJoin(Organization, { Organization.organizationId }, { Production.organizationId })
                    .innerJoin(Performance, { Production.productionId }, { Performance.productionId })
                    .slice(Production.name, Performance.date)
                    .select { Organization.id eq organizationId }
                    .orderBy(Performance.date)
                    .distinct()
                    .forEach {
                        println("${it[Production.name]}")
                    }
    t
    1 reply · 2 participants
  • d

    danielm

    05/31/2018, 2:04 PM
    I want to get the distinct production names sorted by the first performance date for a given organization. But the code returns all production rows.
    t
    1 reply · 2 participants
  • d

    danielm

    05/31/2018, 2:09 PM
    I've also tried something like .distinctBy { Production } but here only one row is returned.
    t
    7 replies · 2 participants
  • d

    danielm

    06/01/2018, 7:30 AM
    Is there a reason why Exposed is (still) using joda-time?
    l
    o
    +2
    7 replies · 5 participants
  • t

    Toby

    06/01/2018, 10:20 AM
    Hey guys, got a bit of an odd one here: I've got an exposed
    date()
    column (postgres
    Date
    ) and I can store dates correctly in it. However, when I read from the database, it seems to create a DateTime with a one hour offset: Ie, I store
    2018-04-27
    in the db, it gets read as
    2018-04-27T00:00:00.000+01:00
    which is
    2018-04-26
    t
    3 replies · 2 participants
  • d

    Damien

    06/06/2018, 7:51 PM
    I'm use the version 0.10.2 Yes, company is an UUIDEntity
    t
    10 replies · 2 participants
  • b

    BorzdeG

    06/07/2018, 6:14 PM
    Can I specify in Exposed that the query
    Entity.all()
    be sorted by default on the primary key? Now for each request, we have to write
    Entity.all().sortedBy{ it.id }
    t
    1 reply · 2 participants
  • h

    Hamza

    06/11/2018, 9:32 AM
    can anyone help me set up a basic exposed datasource? I’m running with mysql on a digital ocean server
    t
    4 replies · 2 participants
  • o

    oshai

    06/14/2018, 10:21 AM
    I saw exposed 10.3 was released. Is there a changelog?
    t
    4 replies · 2 participants
Powered by Linen
Title
o

oshai

06/14/2018, 10:21 AM
I saw exposed 10.3 was released. Is there a changelog?
t

tapac

06/14/2018, 10:27 AM
Will post here in a few minutes.
o

oshai

06/14/2018, 10:34 AM
I suggest to have a changelog.md in repo. Nothing fancy but will stay longer
t

tapac

06/14/2018, 10:34 AM
I guess that it's ok to keep it in wiki, what do you think?
o

oshai

06/14/2018, 12:34 PM
Its ok, but I think changelog in project root is more standard
👌 1
View count: 4