[3.0] Select all properties from table when joining
See original GitHub issueIn one query we are selecting a row in the model table based on some where conditions form a foreign table, thus we join the foreign key table. The primary key column name on that foreign table is the same as on the model table, so sometimes the wrong primary key was returned (the one of the foreign table row)
We worked around the issue by creating a similar property as Property.ALL_PROPERTY
:
private Property<Pass> ALL_MODEL_PROPERTY = new Property(Model.class, "*") {
@Override public String toString() {
return FlowManager.getTableName(Model.class) + "." + getNameAlias().getAliasNameRaw();
}
};
This feels very hackish, so it would be nice to have a cleaner way to get such a property to only select all properties from a single table when joining multiple ones.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Select All columns for all tables in join + linq join
While you cant expand them to columns, you can simply return the entities. Eg: select new { CTLJCRJOB, CTLRFDSTM }.
Read more >Getting All the Results When Joining with LINQ
When you want to find all the objects that are missing a corresponding object, then you need the LINQ equivalent of an outer...
Read more >SQL joins and how to use them - Launch School
This type of join contains all of the rows from both of the tables. Where the join condition is met, the rows of...
Read more >SQL JOIN TABLES: Working with Queries in SQL Server
In this article, you will see how to use different types of SQL JOIN tables queries to select data from two or more...
Read more >Join tables and queries - Microsoft Support
In query Design view, double-click the join you want to change. · In the Join Properties dialog box, note the choices listed beside...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is a method that takes care of the ambiguous issue when it is a result of a join query.
Results in a query something like this:
@trevjonez @agrosner I love you 😃