Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to edit associated items in play forms #36

Open
frankdavid opened this issue Dec 8, 2013 · 2 comments
Open

Add option to edit associated items in play forms #36

frankdavid opened this issue Dec 8, 2013 · 2 comments

Comments

@frankdavid
Copy link

Say, I have a 1:1 relation between User and Car.

case class User(name: String) extends ActiveRecord {
    lazy val car = hasOne[Car]
}
case class Car(name: String) extends ActiveRecord {
    lazy val user = belongsTo[User]
}
// companion objects

And I have a form

val form = User.form

Now it would be nice if I could access the car through the form.

form("car[name]").value

In reflections.scala around line 155 in method FieldInfo#fieldInfo() the value of clazz parameter will be BelongToAssociation and the method throws notSupported exception, so this field wont be included in the class's field list.

@pcboy
Copy link

pcboy commented Apr 15, 2015

Any news on this?

@mediavrog
Copy link

👍

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

No branches or pull requests

3 participants