E
E
EVOSandru62019-07-02 14:10:36
Kotlin
EVOSandru6, 2019-07-02 14:10:36

How to correctly set a link to a table in exposed and produce a condition on the current and link table when deleting?

Hi, guys, can you tell me how to correctly set a link to a table in exposed and make a condition on the current and link table?
2 tables are connected ( OffersTable [ id , offer_type]) and ( OfferGeoTable [ offerId ])

OfferGeoTable.deleteWhere {
                OfferGeoTable.offerId.eq(offer.id) and
                        (OfferGeoTable innerJoin OffersTable){
                            OfferGeoTable.offerId.equals(OffersTable.id)
                        }.eq(offer.offerType)
            }

Swears in this case:
Expression '(OfferGeoTable innerJoin OffersTable)' of type 'Join' cannot be invoked as a function. The function 'invoke()' is not found

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question