Content-Length: 238440 | pFad | http://github.com/objectify/objectify/issues/407

D3 Inner classes in Kotlin are not saved via objectify? · Issue #407 · objectify/objectify · GitHub
Skip to content

Inner classes in Kotlin are not saved via objectify? #407

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

Open
pot8os opened this issue Oct 14, 2018 · 2 comments
Open

Inner classes in Kotlin are not saved via objectify? #407

pot8os opened this issue Oct 14, 2018 · 2 comments

Comments

@pot8os
Copy link

pot8os commented Oct 14, 2018

version: 5.1.22 (Sorry I'm not migrated yet. It's fine if it works on v6)

Hello team, let me report an issue where I happend to face recently. My project code on GAE are written in Java basically but I start converting to Kotlin one by one since I like that language so much and it works on GAE well so far.
The following code worked fine and the server returns json data properly, it contains some data in an array attribute.
It's like:

@Entity
public class MyData extends Data { 
  private List<Record> records = new ArrayList<>();
   
  // snip constractor methods
  
  public static class Record: Serializable { ... }
}
{ 
  "records": [
    { "name": "foo" },
    { "name": "bar" }
  ]
}

However, after I convert that class to Kotlin, a response json data that it gets via objectify doesn't contain any values in an array.

@Entity
class MyData : Data() { 
  val records = mutableList<Record>()
  // snip
  class Record : Serializable {
    ...
  }
}
{ 
  "records": [  // <--- data is not saved!
  ]
}

I think I was missing some required configuration, so could you create a document about a case for Kotlin if possible?
Thanks,

@stickfigure
Copy link
Contributor

Unfortunately none of the people who work on Objectify are very familiar with Kotlin (yet). I will leave this question open though.

@pot8os
Copy link
Author

pot8os commented Oct 17, 2018

I see, thanks for the response!

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

No branches or pull requests

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/objectify/objectify/issues/407

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy