0

I recently started using Rob Conery's Massive for reading from an Oracle database in C#.

It's working really well. However, recently I came across a problem when trying to perform an inner join. Usually you just do this to specify what table you are reading from:

public class Products:DynamicModel {

    public Products():base("northwind", "products","productid") {}
}

However, when performing an inner join you are reading from more than one table. How would I get around this?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Marty Cochrane
  • 679
  • 2
  • 13
  • 26

2 Answers2

1

It looks like you don't actually need the specify the table name.

If you just leave it as an empty string like below, the join works perfectly fine.

public class Products:DynamicModel {

    public Products():base("northwind", "", "productid") {}}
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Marty Cochrane
  • 679
  • 2
  • 13
  • 26
1

Just use Products.Query in that given join query. It will give all the property needed. Just go through blog post http://rob.conery.io/2011/09/27/massives-dynamic-query-syntax. This will help you out. It's from Rob Conery himself, who created Massive.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
kunjee
  • 2,739
  • 1
  • 23
  • 38
  • The link is broken. It would be better to summarise the crucial information in your answer. – Peter Mortensen Nov 25 '18 at 16:07
  • @PeterMortensen sorry. It was very early days of using SO. and Massive moved to another place lately so I guess Rob's link will not work. – kunjee Nov 28 '18 at 11:34