Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Feature Request: convenience associationId attribute #23

Closed
actsasflinn opened this issue Sep 24, 2010 · 1 comment
Closed

Feature Request: convenience associationId attribute #23

actsasflinn opened this issue Sep 24, 2010 · 1 comment

Comments

@actsasflinn
Copy link
Contributor

Not a big issue but for convenience I'd like to be able to access at stateId attribute in a case like this:

class User extends Record[User] {
  val state = "state_id" REFERENCES(State) ON_DELETE CASCADE ON_UPDATE NO_ACTION
}

I've had mixed results being able to specify the following. Sometimes stateId() is 0 or null even when state().id() is actually set.

class User extends Record[User] {
  val stateId = "state_id" BIGINT
  val state = "state_id" REFERENCES(State) ON_DELETE CASCADE ON_UPDATE NO_ACTION
}

I'm going to try to implement this when I get a chance unless you solve it first.

@inca
Copy link
Owner

inca commented Sep 25, 2010

Already got it in 2.0 (they came up with primary key type params).

This issue was closed.
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