ormlite store unknown foreign object in DatabaseField

For example :

i need an Animals table which will contain animal_type as Object or T type as foreign relation field.

then i will have 10 different tables like Dog/Cat/Horse etc.

at the time of insertion based on type of animal i would set animal_type of Animal object.

I don't want to take multiple databaseField for each type as a foreign relation, instead i need one generic field , Using ormlite version 5.0 .

please refer this json: { "animal": { "type": 1, "content": { "items": [ { "title": "Image", "desc": "This is item with image", "media": { "url": "https://upload.wikimedia.org/wikipedia/commons/9/99/Earth_rise_from_the_Moon_AS11-44-6550_2.JPG", "type": 0 }, "options": [ { "title": "View", "value": "view" }, { "title": "Download", "value": "download" } ], "url": "https://commons.wikimedia.org/wiki/File%3AEarth_rise_from_the_Moon_AS11-44-6550_2.JPG" } ] } } }

链接地址: http://www.djcxy.com/p/65394.html

上一篇: 球碰撞

下一篇: ormlite在DatabaseField中存储未知的外来对象