Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RegisterColumnOverride on a table at configuration level #770

Closed
dmiorandi opened this issue May 23, 2014 · 10 comments
Closed

RegisterColumnOverride on a table at configuration level #770

dmiorandi opened this issue May 23, 2014 · 10 comments
Milestone

Comments

@dmiorandi
Copy link

@dmiorandi dmiorandi commented May 23, 2014

Hi Timo,
as discussed on google group, I would like to have the possibility to
map column override in configuration like already available for schema and tables.

configuration.registerColumnOverride(....);

It should be at table level, so parameter required parameters are

table
oldcolumnname
newcolumnname

I don't know if also a global schema column override have sense, maybe if come out with no cost yes.

Do you think is a quick feature to implement? Have you got an idea about possible snapshot release date?

Tks
Denis

@timowest
Copy link
Member

@timowest timowest commented May 23, 2014

Overrides for both schema+table+column and table+column should be provided. I should have time for it next week.

@dmiorandi Feel free to provide a pull request to speed things up.

@dmiorandi
Copy link
Author

@dmiorandi dmiorandi commented May 23, 2014

Cook. Tks timo.

@timowest timowest added the fixed label May 25, 2014
@timowest timowest added this to the 3.4.0 milestone May 25, 2014
@dmiorandi
Copy link
Author

@dmiorandi dmiorandi commented May 26, 2014

I was thinking about this feature(maybe is more related to override in general). There is another requirements imho.
Let be A,B,C some schemas and CA,CB,CC relative generated code, and PCOMMON,PA,PB,PC
java projects, where PCOMMON is shared from PA,PB,PC. PCOMMON imports CA,CB,CC.

The idea is to run specialized queries in PA,PB,PC and cross queries in PCOMMON.

At now we have solved query generation via override, so I can run cross query in PCOMMON using i.e. CA to run queries, so resultset of PCOMMON is always in terms of CA classes.

I would like to choose if resultset in PCOMMON is of type CA, CB, CC at runtime. This is because in specialized projects i.e. in PB i would like to have CB classes not CA classes. Btw is necessary to run overrides in reverse way to map CB on CA.

What dou you think about, is it clear the issue?

@timowest
Copy link
Member

@timowest timowest commented May 26, 2014

I am not sure if I understand. What kind of projections do you use? Generated bean types?

If the columns and properties are identical it should be possible to use the types interchangeably.

@dmiorandi
Copy link
Author

@dmiorandi dmiorandi commented May 26, 2014

Yes i use generated bean projection. At now cross query is project ed in
common project pcommon using a set of classe i.e. from A schema. I would
like to choose dynamically if use generated class es from schema A B C so
if i use in derivate project it sue the right set of.generated classes non
always ones from A.
Il 26/mag/2014 18:37 "Timo Westkämper" notifications@github.com ha
scritto:

I am not sure if I understand. What kind of projections do you use?
Generated bean types?

If the columns and properties are identical it should be possible to use
the types interchangeably.


Reply to this email directly or view it on GitHubhttps://github.com//issues/770#issuecomment-44203218
.

@timowest
Copy link
Member

@timowest timowest commented May 26, 2014

You can freely dynamically choose the set of projected classes, but I don't know if this needs any changes to Querydsl.

@dmiorandi
Copy link
Author

@dmiorandi dmiorandi commented May 26, 2014

I will try to make more concrete proposal or example.

@timowest
Copy link
Member

@timowest timowest commented Jun 8, 2014

@dmiorandi Is the related pull request ok to merge or do you have some use cases in mind that are not supported via it?

@dmiorandi
Copy link
Author

@dmiorandi dmiorandi commented Jun 9, 2014

I've tried but is quite difficult to imagine in theory the requirement. I think I will choose dynamically the set of classes to be use on resultset writing my own external code. After this If there is new needs I'll open a new issue or pull request.
At now you can merge this one.
Tks.

@timowest
Copy link
Member

@timowest timowest commented Jun 9, 2014

Released in 3.4.0

@timowest timowest closed this Jun 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.