8000 mysql JOIN doesn't appear to be happening properly · Issue #62 · sorm/sorm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

mysql JOIN doesn't appear to be happening properly #62

Open
bthibault opened this issue Oct 19, 2015 · 3 comments
Open

mysql JOIN doesn't appear to be happening properly #62

bthibault opened this issue Oct 19, 2015 · 3 comments

Comments

@bthibault
Copy link

Was reading through stackoverflow and I think I have the Scala relations setup correctly

case class Phone2(name: String, features: String, carrier: Carrier, devicemcd: String )
case class Carrier(CarrierName: String)

The carrier table is normalized data and should be joined

so I use

 DB.fetchById[Phone2](id)

And with the sql tracing I get

| SELECT
| t0.id, t0.devicemcd, t0.carrier$id, t0.features, t0.name
| FROM
| phone2
| AS t0
| WHERE t0.id = ?

  • data:
    | - 1111

which throws a runtime error

@nikita-volkov
Copy link
Contributor

Try this:

-case class Carrier(CarrierName: String)
+case class Carrier(carrierName: String)

@bthibault
Copy link
Author

That didn't help...

I can query Carrier independently but still not joining and populating properly. I'm getting the same trace sql.

@nikita-volkov
Copy link
Contributor

Hmm. Might be a bug. I suspect it's due to Carrier having only one field.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0