Collection DataSource with external dataStore

Hi,

I have a question,
So I have two different entities. One of them uses the main data store and the other has an external data store.
I’m trying to use the Collection Data Source component like this

@Inject
 private Datasource<Poddocu> poddocusDs;

with the entity using an external data source. Is it possible? I am getting a compilers error whenever I use it. But when I use the entity with the main data store, that works without any compiling errors.

I tried a normal Datasoure like the one below and that works for both entities.

@Inject
private Datasource<Poddocu> poddocusDs;

Is there a reason why it accepts the entity with the main data store and not the one with an external store? Is there a way around this? Using a Collection Data source for a external data store entity?

Regards

Hi,

  1. It should work with external datastore.

  2. It’s impossible to help you more unless you provide more details. At least the text of compilation error you’ve got.

Regards,

Hi,

Here is a snippet of the compilation error.

Compiler%20Error

The Poddocu argument is the entity with the external data store .

Regards,

The error means that Poddocu class does not inherit from Entity<UUID>. Or it has another type of ID.

If Poddocu uses another type of primary key ID, for example Long - then you should use

CollectionDatasource<Poddocu, Long> datasource;

Regards,