1

在 java 中持久化一个包含相同类型对象集合的对象时,我不断收到错误消息。我正在使用:OrmLite Sqlite

米课是

@DatabaseTable(tableName="Profile") 
public class Profile {


/** the users username in the system */
@DatabaseField( unique = true)
private String usrName = null;

/** the users id */
@DatabaseField( generatedId = true)
private Integer usrId = null;

/** the users name */
@DatabaseField
private  String name = null;

/**the users friends*/
@ForeignCollectionField
private Collection<Profile> friends;

我忘了申报什么吗?我发现了一些关于外国领域的东西,但我已经设置了 id 和 @foreigncollectionfield 标记。

假设一个配置文件存储其他配置文件,但存储的配置文件不一定具有对该配置文件的引用。

感谢您的回答!:)

4

0 回答 0