Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jaime Lossada
    @dco5
    Hello! love your library, I was trying to use SugarORM but I could not figure out how to upgrade the database once I made a change and also I had to write a lot of code to handle one to many relationships. I have a question, how could I query for a month and year? I have a Date Field on my class
    Stuart Campbell
    @Stuart-campbell
    Hi,
    Thanks.
    Dates are stored as longs in the db
    So what you would have to do is search before data and after date

    Something like this

    Date endOfTheMonth;
    Date startOfTheMonth;

       List<Class> results = new RushSearch().whereBefore("date", startOfTheMonth)
                         .whereAfter("date", endOfTheMonth).find(Class.class);
    Stuart Campbell
    @Stuart-campbell
    Forgot the and..
    List<Class> results = new RushSearch().whereBefore("date", startOfTheMonth)
                     .and()
                     .whereAfter("date", endOfTheMonth).find(Class.class);
    Jaime Lossada
    @dco5
    Working like a charm! the only thing is that WhereAfter().and().WhereBefore() was the way I could get it to work for in between. Thanks so much for your help!
    Stuart Campbell
    @Stuart-campbell
    Glad you got it working, happy to help.
    HDANILO
    @HDANILO
    Hi guys, so, I came here to discuss the ID issue, I could make a Pull Request getting the setID property to the RushObjects
    I liked your ORM alot, I bet it'll be a success very soon
    HDANILO
    @HDANILO
    A doubt just kicked in, when I stablish a one-to-many relation using @RushList, from the children object point of view, how do I recover the ID or reference of the father?
    HDANILO
    @HDANILO
    There are a few things that were not clear enough about one to many relations, the children are auto injected on the proper Lists or I have to map that myself? Is it eager or lazy?
    Diego Aguilar Aguilar
    @diegoaguilar
    Hello, Im trying to use Rush but I cant save anything to databse without ending with a RushClassNotFoundException

    This is what my class looks like:

    ```

    package apps.android.expressa.expressa.Models;
    
    
    import java.util.List;
    
    import co.uk.rushorm.core.RushObject;
    import co.uk.rushorm.core.annotations.*;
    
    /**
     * Created by diegoaguilar on 4/25/15.
     */
    
    public class Person extends RushObject {
    
        private String name;
        private String uri;
        @RushList(classType = CustomString.class)
        private List<CustomString> strings;
    
        /* Classes must include an empty constructer */
        public Person(){}
    
        public Person(String name, String uri) {
            this.setName(name);
            this.setUri(uri);
        }
    
        public String getName() {
            return name;
        }
    
        public void setName(String name) {
            this.name = name;
        }
    
        public String getUri() {
            return uri;
        }
    
        public void setUri(String uri) {
            this.uri = uri;
        }
    
        public List<CustomString> getStrings() {
            return strings;
        }
    }
    And I tried with both constructors, however calling save on an instance will end in that exception. I looked in docs and can't find any reason.
    Stuart Campbell
    @Stuart-campbell
    Hi
    Does your class CustomString extend RushObejct as well?
    Also do you have the rush set in debug mode?
    Diego Aguilar Aguilar
    @diegoaguilar
    Thanks @Stuart-campbell
    CustomString is extending RushObject
    I had debug mode set to false
    Diego Aguilar Aguilar
    @diegoaguilar
    it's still happening the same
    co.uk.rushorm.core.exceptions.RushClassNotFoundException: Rush class Person was not found. Please make sure that if you have implemented your own RushClassFinder it returns this class.
                at co.uk.rushorm.core.implementation.Insert.ReflectionSaveStatementGenerator.generateSaveOrUpdate(ReflectionSaveStatementGenerator.java:77)
                at co.uk.rushorm.core.implementation.Insert.ReflectionSaveStatementGenerator.generateSaveOrUpdate(ReflectionSaveStatementGenerator.java:51)
                at co.uk.rushorm.core.RushCore.save(RushCore.java:455)
                at co.uk.rushorm.core.RushCore.access$400(RushCore.java:39)
                at co.uk.rushorm.core.RushCore$2.callback(RushCore.java:159)
                at co.uk.rushorm.android.AndroidRushQueProvider$1.run(AndroidRushQueProvider.java:40)
                at java.lang.Thread.run(Thread.java:856)
    Stuart Campbell
    @Stuart-campbell
    So you have set debug to true. Can you share class Person?
    Diego Aguilar Aguilar
    @diegoaguilar
    sure I'm sharing it right now