RegisterColumnOverride on a table at configuration level #770

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

Comments

Projects
None yet
2 participants
@dmiorandi

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 23, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@dmiorandi

dmiorandi May 23, 2014

Cook. Tks timo.

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

This comment has been minimized.

Show comment
Hide comment
@dmiorandi

dmiorandi 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?

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 26, 2014

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@dmiorandi

dmiorandi 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/querydsl/querydsl/issues/770#issuecomment-44203218
.

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/querydsl/querydsl/issues/770#issuecomment-44203218
.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest May 26, 2014

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@dmiorandi

dmiorandi May 26, 2014

I will try to make more concrete proposal or example.

I will try to make more concrete proposal or example.

@timowest

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 8, 2014

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@dmiorandi

dmiorandi 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.

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

This comment has been minimized.

Show comment
Hide comment
@timowest

timowest Jun 9, 2014

Member

Released in 3.4.0

Member

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