Git Product home page Git Product logo

Comments (8)

greenrobot avatar greenrobot commented on July 18, 2024

So, you are suggesting to generate a server-side (App Engine) converter system?

In general, if you want to extend the code generation in greenDAO, you should have a look at FreeMarker. greenDAO uses FreeMarket templates

from greendao.

funk78 avatar funk78 commented on July 18, 2024

Im suggesting to extend the generatorDao so it generates the Contructor which accepts an AppEngine Entity and the toDataStoreEntity Method. Also some static variables are needed and one import statement. I will just do it and then you can have a look at it and decide if you like to merge it.

from greendao.

greenrobot avatar greenrobot commented on July 18, 2024

So you are sending AppEngine Entities to the Android client?

from greendao.

funk78 avatar funk78 commented on July 18, 2024

I have a local database on the android client which i want to keep in sync with the datastore.

Im marshalling the Datastore Entity to the greenDAO entity on the server side.

from greendao.

funk78 avatar funk78 commented on July 18, 2024

ok its finished, what do you think about it?

I also generate an Entity stub for the Android Client to work.

Oh and i had some problems with the formatter, i couldnt find out your formatter settings, could you upload the eclipse formatter.xml to the project dir?

So when you check the diff, make sure you reformat the class first.

from greendao.

funk78 avatar funk78 commented on July 18, 2024

https://github.com/funk78/greenDAO

from greendao.

funk78 avatar funk78 commented on July 18, 2024

ok i realised how useless the feature is after i ran into some trouble with my fake Entity over and over again :)

i commited a version where the generator simply generates 2 methods to convert an entity to a Map<String, Object> and reverse.

this map works as a dto now and can easily be integrated with the datastore.

its not too much functionality, feel free to copy and paste the necessary code if u like the feature.

from greendao.

greenrobot avatar greenrobot commented on July 18, 2024

I'd love to see some generic synchronization using greenDAO. I guess this should mature in a separate project for a while.

from greendao.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.