How to generate POJOs using schema-import tables has no primary key

classic Classic list List threaded Threaded
2 messages Options
diopek diopek
Reply | Threaded
Open this post in threaded view
|

How to generate POJOs using schema-import tables has no primary key

This post has NOT been accepted by the mailing list yet.
I have one table that doesn't have primary key which has foreign key (man-to-one ) from another table,  These two tables will be cached to be used in join as read-only.
By using schema-import utility, for such a table that doesn't have a primary key, is there a way to generate entity class (POJO) that has formula generated  primary key?
Alexey Kuznetsov Alexey Kuznetsov
Reply | Threaded
Open this post in threaded view
|

Re: How to generate POJOs using schema-import tables has no primary key

Hi!

Could you provide more details?
Especially your table metadata.

I think you could just mark in UI foreign key fields as key fields and that will do what you need.

Also please read documentation about joins in Ignite (your data should be properly collocated).
http://apacheignite.readme.io/docs/cache-queries

And also feel free to change code generated by schema-import utility for your needs.
It is just generated code you can add / change  it.