Up

> 
> Hi,
> 
> I have some objects that I want to put in an ignite cache and also want to
> query them using jdbc sql.
> I have used QueryEntity to define the mapping between object model and
> relational model.
> 
> My problem is :
> 
> My objects uses inheritence.
> "Asset" object is the parent, and "OTC" object and "Security" Object inherit
> from Asset.
> 
> Asset
> |-OTC
> |-Security
> 
> I would like to have an sql model that is represented with 3 tables
> ASSET table which will contain all attributs from Asset Object
> OTC table which will contain all specialized attributs from OTC Object
> SECURITY table which will contain all specialized attributs from Security
> object
> 
> And of course all data from 3 tables have to be mapped on the same cache (I
> do not want to duplicate data in 2 caches)
> 
> Here is what I have done:
> 
> assetQueryEntity, OTCQueryEntity, SecurityQueryEntity are QueryEntity
> definition for each of the 3 tables :
> 
> LinkedList<QueryEntity> qeList = new LinkedList<>();
> 
> qeList .add(assetQueryEntity);
> qeList .add(OTCQueryEntity);
> qeList .add(SecurityQueryEntity);
> 
> CacheConfiguration cacheCfg = new CacheConfiguration<>("AssetCache");
> cacheCfg.setQueryEntities(qeList);
> IgniteCache cache = ignite.getOrCreateCache(cacheCfg);
> 
> 
> The result is that I can see 3 tables with the right definition.
> I can select data from OTC and SECURITY tables.
> but the Asset table is empty
> 
> Is there a way to do that ?
> 
> Thanks for your help
> 
> 
> 
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to