java - Sqlite persist object containing collection of objects -


i keep getting error when persisting object in java collection of same type of objects inside. im using: ormlite sqlite

mi class

@databasetable(tablename="profile")  public class profile {   /** users username in system */ @databasefield( unique = true) private string usrname = null;  /** users id */ @databasefield( generatedid = true) private integer usrid = null;  /** users name */ @databasefield private  string name = null;  /**the users friends*/ @foreigncollectionfield private collection<profile> friends; 

am forgetting declare anything? found foreign field, set id , @foreigncollectionfield tag.

supposedly profile stores other profiles, not profiles stored have references profile.

thanks answers! :)


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -