Liquibase generateChangelog creates wrong precision for Oracle - oracle11g

For some reason when I generate a change log with Liquibase it uses wrong precision. It generates a column with data type NUMBER(0,-127).
Does anybody know how to fix this?

<changeSet author="sfasdf (generated)" id="1357744702717-1">
<createTable schemaName="BLA" tableName="ADT_PAGE_ACCESS">
<column name="ID" type="NUMBER(0,-127)">
<constraints nullable="false" primaryKey="true" primaryKeyName="ADT_PAGE_ACCESS_PK" primaryKeyTablespace="ZON_IND1"/>
</column>
<column name="PAGE_ID" type="VARCHAR2(100 BYTE)">
<constraints nullable="false"/>
</column>
<column defaultValueComputed="sysdate" name="ACCESSED" type="DATE">
<constraints nullable="false"/>
</column>
<column name="CUSTOMER_ID" type="NUMBER(0,-127)"/>
<column name="USERID" type="VARCHAR2(25 BYTE)"/>
</createTable>
</changeSet>

Related

FastReport open source object data source

I try to use FastReport open source to build reports from data I'll provide to the report.
I've found what I want in the demos (https://github.com/FastReports/FastReport/tree/master/Demos/OpenSource/DataFromBusinessObject/DataFromBusinessObject)
In this demo, I see in the report file that a BusinessObjectDataSourceis used, which seems to be what I want to use.
However, I don't see a way to add this kind of source in the community designer. Do I need to add all of this manually ? Or is there a way to generate the needed markup ? I can't find the solution on their site.
I found a way by making the needed xml by hand like this:
<BusinessObjectDataSource Name="Invoices" ReferenceName="Invoices" Enabled="true">
<Column Name="Reference" DataType="System.String"/>
<Column Name="Date" DataType="System.String"/>
<Column Name="CompanyName" DataType="System.String"/>
<Column Name="InvoiceEmail" DataType="System.String"/>
<Column Name="VAT" DataType="System.String"/>
<Column Name="Street" DataType="System.String"/>
<Column Name="Number" DataType="System.String"/>
<Column Name="City" DataType="System.String"/>
<Column Name="ZipCode" DataType="System.String"/>
<Column Name="Country" DataType="System.String"/>
<Column Name="TotalPrice" DataType="System.Decimal"/>
<Column Name="VATValue" DataType="System.Decimal"/>
<Column Name="VATPercentage" DataType="System.Decimal"/>
<Column Name="VATComment" DataType="System.String"/>
</BusinessObjectDataSource>
The only drawback is that I need to update this if my object changes (but at least is is working !)
I found a way to generate an empty report with the fields generated from a business object.
You only have to create an empty report object, call "RegisterBusinessObject()" on its Dictionary property, and then save the report itself:
var report = new Report();
report.Dictionary.RegisterBusinessObject(
new List<Invoice>(), // a (empty) list of objects
"Invoices", // name of dataset
2, // depth of navigation into properties
true // enable data source
);
report.save(#"invoiceReport.frx");
You still need to update the report description if your object changes, but at least you don't have to code it by hand!

AWK - weird difference between printf and sprintf when taking substr

it's been a while since I have used AWK, but now i have an XML file where I like to increase an Id for a specific column; so it's an excellent task for AWK.
In theory, to increase the Id, the line gets parsed, you fish out the Id into a variable, ++ it, and reconstruct the line to print to the resulting stream.
However, when I use the variable ( x = sprintf(...)) I got weird results, so I used printf to debug the thing. And now the weird part : printf dumps exactly the right Id, but the variable gets rubbish, although they have the same input & syntax ...
Must be somethinig really silly off course, but I can't put my finger on it.
All Ids are in the form :
<column name="Id" type="System.Int32">x</column>
This is the code :
#!/bin/ksh
cd /mnt/c/J/D/Work/GIT/Repos/SkillsNG/SkillsNG.WebTests/Snapshots
print -n "Snapshot name: "
read snapshot
defaultId=0
print -n "Start increasing from Id [$defaultId]":
read id
[[ "$id" = '' ]] && id=$defaultId
cat $snapshot | awk -F '>' 'BEGIN {process=0;} {
if (match($0, /SecurityPermissions/))
{process=1;}
else
{
if (!process)
{
# just dump all tables up to SecurityPermissions, no processing needed
print;
next;
}
}
if (match($1, /<column name="Id" type="System.Int32"/))
{
if(match($2,/[0-9]*/))
{
printf "param 1: %s\n", $1
printf "param 2: %s\n", $2
printf "Id value : %s\n", substr($2, 1, index($2,"\<")-1);
val = sprintf("%s", substr($2,1, index($2,"\<")-1));
printf "value in variable: %s\n", $val;
newval = strtonum(val);
printf "new: %s\n", $newval
}
}
else print $0;
}' > $snapshot.new
# mv $snapshot $snapshot.old
# mv $snapshot.new $snapshot
cd -
And this a simple test xml:
<snapshot culture="en-US">
<table name="[dbo].[SecurityPermissions]">
<row>
<column name="Id" type="System.Int32">1</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">1</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
<column name="Id" type="System.Int32">2</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">50</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
<column name="Id" type="System.Int32">3</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">51</column>
<column name="Access" type="System.Int32">15</column>
</row>
<row>
<column name="Id" type="System.Int32">4</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">52</column>
<column name="Access" type="System.Int32">3</column>
</row>
<row>
<column name="Id" type="System.Int32">5</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">53</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
<column name="Id" type="System.Int32">6</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">54</column>
<column name="Access" type="System.Int32">3</column>
</row>
<row>
<column name="Id" type="System.Int32">7</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">56</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
<column name="Id" type="System.Int32">8</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">57</column>
<column name="Access" type="System.Int32">3</column>
</row>
<row>
<column name="Id" type="System.Int32">9</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">77</column>
<column name="Access" type="System.Int32">15</column>
</row>
<row>
<column name="Id" type="System.Int32">10</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">78</column>
<column name="Access" type="System.Int32">15</column>
</row>
<row>
<column name="Id" type="System.Int32">11</column>
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">80</column>
<column name="Access" type="System.Int32">15</column>
</row>
</table>
</snapshot>
Result file :
<snapshot culture="en-US">
<table name="[dbo].[SecurityPermissions]">
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 1</column
Id value : 1
value in variable: <column name="Id" type="System.Int32"
new: <column name="Id" type="System.Int32"
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">1</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 2</column
Id value : 2
value in variable: 2</column
new: 2</column
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">50</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 3</column
Id value : 3
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">51</column>
<column name="Access" type="System.Int32">15</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 4</column
Id value : 4
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">52</column>
<column name="Access" type="System.Int32">3</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 5</column
Id value : 5
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">53</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 6</column
Id value : 6
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">54</column>
<column name="Access" type="System.Int32">3</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 7</column
Id value : 7
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">56</column>
<column name="Access" type="System.Int32">1</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 8</column
Id value : 8
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">57</column>
<column name="Access" type="System.Int32">3</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 9</column
Id value : 9
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">77</column>
<column name="Access" type="System.Int32">15</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 10</column
Id value : 10
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">78</column>
<column name="Access" type="System.Int32">15</column>
</row>
<row>
param 1: <column name="Id" type="System.Int32"
param 2: 11</column
Id value : 11
value in variable:
new:
<column name="GroupId" type="System.Int32">1</column>
<column name="Securable" type="System.Int32">80</column>
<column name="Access" type="System.Int32">15</column>
</row>
</table>
</snapshot>
As can be seen from the result file, the Id value (via printf) works correctly, but the same construct to a variable (via sprintf) produces garbage.
Anybody got an idea what is going on?
Thanks in advance.
Cheers,
DJ
First of all, you should not try to do these things with awk or sed or anything like that. XML is a complicated data-structure with all its ugliness connected to it. While a simple awk might do it now, it will fail all of a sudden and you will not know what hit you.
If you want to increment that particular value, you could use the following xmlstarlet command:
$ xmlstarlet ed --update '//table/row/column[#name="Id"]' -x ".+1" test.xml
It reads like this: xmlstarlet will (ed) edit the file test.xml by (--update) updating all nodes that match the XPath expression ('//table/row/column[#name="Id"]' :: all nodes column child of row child of of table with an attribute name equal to Id) and change its value with an XPath expression -x ".+1" (increment current value (.))
To answer your question: you obtain the unexpected results with awk because you reference some variables using $. Example:
val = sprintf("%s", substr($2,1, index($2,"\<")-1));
printf "value in variable: %s\n", $val;
In your first line, you compute the value of val but in the second line, you use $val. The latter actually returns the value of the field with number val. So if val=2, then $val will return $2, i.e. the content of the second field.

doctrine2 (xml): in a one-to-many bidirectional relationship, can't get the infers side?

i have Banner and Group entities with xml configs
Banner.xml
<mapped-superclass name="Banner" table="luc_banners"
repository-class="BannerRepository">
<id name="id" column="id" type="integer">
<generator strategy="AUTO" />
</id>
<field name="path" column="path" type="string" nullable="true" />
<field name="link" column="link" type="string" nullable="true" />
<field name="position" column="position" type="string" nullable="true" />
<field name="groupId" column="group_id" type="integer" />
<many-to-one field="group" target-entity="Group" inversed-by="banners">
<join-column name="group_id" referenced-column-name="id" nullable="false" on-delete="CASCADE" />
</many-to-one>
</mapped-superclass>
Group.xml
<mapped-superclass name="Group" table="luc_banners_groups" repository-class="GroupRepository">
<id name="id" column="id" type="integer">
<generator strategy="AUTO" />
</id>
<field name="name" column="group_name" type="string" nullable="true" />
<field name="type" column="group_type" type="string" nullable="true" />
<field name="status" column="group_status" type="string" nullable="true" />
<field name="order" column="group_order" type="integer" nullable="true" />
<one-to-many field="banners" target-entity="Banners" mapped-by="group">
<cascade>
<cascade-all />
</cascade>
</one-to-many>
</mapped-superclass>
when trying to get banners form group object i get empty array, and Profiler shows this sql SELECT l0_.group_name AS group_name0, l0_.id AS id4 FROM luc_banners_groups l0_ WHERE l0_.group_status = ? and show not valid entity with this error Banner - The association Banner#group refers to the inverse side field Group#banners which does not exist.
Can you help me with this thing ?
remove <field name="groupId" column="group_id" type="integer" /> from Banner.xml, I think it's overriding the second one..

LINQ TO SQL Mapping Error

Iam using LINQ To SQL with POCO's and XML mapping. I am getting the following error when I try to run the application: Cannot find type 'MyProject.DataTransfer.User' from mapping.
Below is the mapping:
<Table Name="Users" Member="User">
<Type Name= "MyProject.DataTrasnfer.User">
<Column Name="UserID" Member="UserID" DbType="Int NOT NULL IDENTITY" IsDbGenerated="true"
IsPrimaryKey="true"/>
<Column Name="UserName" Member="UserName" DbType="nvarchar(100) NOT NULL" />
<Column Name="Password" Member="Password" DbType="nvarchar(32)"/>
<Column Name="IsActive" Member="IsActive" DbType="bit NOT NULL"/>
<Column Name="InsertedBy" Member="InsertedBy" DbType="Int NOT NULL" />
<Column Name="InsertedDate" Member="InsertedDate" DbType="DateTime NOT NULL" />
<Column Name="UpdatedBy" Member="UpdatedBy" DbType="Int NOT NULL" />
<Column Name="UpdatedDate" Member="UpdatedDate" DbType="DateTime NOT NULL" />
<Column Name="Version" Member="Version" DbType="rowversion NOT NULL" IsDbGenerated="true"
IsVersion="true" AutoSync="Always"/>
</Type>
</Table>
But 'MyProject.DataTransfer.User' exists in the solution. What could be the possible reasons for this error?
Typo: MyProject.DataTrasnfer.User. You have transposed the s and the n.
I suppose that you have a class MyProject.DataTraSNfer.User in mapping and MyProject.DataTraNSfer.User in code. Misprint in post or in code?

LINQ to SQL: inner join with manual association on SQL 2000

I have two tables in a one to many relationship. (products and qty break pricing). At the database level I cannot create a relationship between the two tables. I brought those two tables into LINQ and created the association manually.
I need to do a big LINQ query and have the tables be joined. My problem is it's not using a join to get the data. LINQ is using 1 select on the main table, then 1 select for each row in that main table.
Dim db As New LSSStyleDataContext(connString)
Dim options As New DataLoadOptions()
options.LoadWith(Function(c As commerce_product) c.commerce_qty_breaks)
db.LoadOptions = options
Dim dbProducts = (From prods In db.commerce_products).ToList
Any thoughts on why this might be? Thanks!
Paul
EDIT: here are the two tables:
CREATE TABLE [dbo].[commerce_product](
[pf_id] [int] NOT NULL,
[name] [varchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS
[description] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[restricted] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
CONSTRAINT [PK_commerce_product_1] PRIMARY KEY NONCLUSTERED
(
[pf_id] ASC
) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
And the other table:
CREATE TABLE [dbo].[commerce_qty_break](
[pf_id] [int] NOT NULL,
[sku] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[qty] [int] NOT NULL,
[list_price] [int] NOT NULL,
[break_id] [int] NOT NULL,
CONSTRAINT [PK_commerce_qty_break] PRIMARY KEY CLUSTERED
(
[pf_id] ASC,
[qty] ASC,
[break_id] ASC
) ON [PRIMARY]
) ON [PRIMARY]
The DBML is straight forward with only the two tables. I created an association between the two tables, "commerce_product" being the parent and "commerce_qty_break" being the child joined by "PF_ID".
I can write something like this:
Dim dbproducts = From prods In db.commerce_products _
Join qtys In db.commerce_qty_breaks On prods.pf_id Equals qtys.pf_id _
Select prods
And i see that it joins on the table in the query, but as soon as i try and spin through the "qty_breaks" it starts executing selects to get that info.
I'm totally stumped.
Edit 2: Here is the DBML:
<?xml version="1.0" encoding="utf-8"?>
<Database Name="LSScommerceDB_DevB" Class="LSSStyleDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
<Connection Mode="AppSettings" ConnectionString="***" SettingsObjectName="HSLPriceUpdate.My.MySettings" SettingsPropertyName="LSScommerceDB_DevBConnectionString" Provider="System.Data.SqlClient" />
<Table Name="dbo.commerce_product" Member="commerce_products">
<Type Name="commerce_product">
<Column Name="pf_id" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
<Column Name="name" Type="System.String" DbType="VarChar(500)" CanBeNull="true" />
<Column Name="description" Type="System.String" DbType="Text" CanBeNull="true" UpdateCheck="Never" />
<Column Name="list_price" Type="System.Int32" DbType="Int" CanBeNull="true" />
<Column Name="image_file" Type="System.String" DbType="VarChar(255)" CanBeNull="true" />
<Column Name="image_width" Type="System.Int32" DbType="Int" CanBeNull="true" />
<Column Name="image_height" Type="System.Int32" DbType="Int" CanBeNull="true" />
<Column Name="sale_price" Type="System.Int32" DbType="Int" CanBeNull="true" />
<Column Name="sale_start" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
<Column Name="sale_end" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
<Column Name="attr_label1" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
<Column Name="attr_label2" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
<Column Name="attr_label3" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
<Column Name="attr_label4" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
<Column Name="attr_label5" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
<Column Name="sku" Type="System.String" DbType="VarChar(100)" CanBeNull="true" />
<Column Name="UOM" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
<Column Name="Sell_Pack" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
<Column Name="mfg_model_number" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
<Column Name="mfg_id" Type="System.Int32" DbType="Int" CanBeNull="true" />
<Column Name="logo_file" Type="System.String" DbType="VarChar(255)" CanBeNull="true" />
<Column Name="drop_ship" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
<Column Name="lead_time" Type="System.Int32" DbType="Int" CanBeNull="true" />
<Column Name="hazard_flag" Type="System.String" DbType="VarChar(50)" CanBeNull="true" />
<Column Name="publish_date" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
<Column Name="restricted" Type="System.String" DbType="VarChar(5)" CanBeNull="true" />
<Association Name="commerce_product_commerce_qty_break" Member="commerce_qty_breaks" ThisKey="pf_id" OtherKey="pf_id" Type="commerce_qty_break" />
</Type>
</Table>
<Table Name="dbo.commerce_qty_break" Member="commerce_qty_breaks">
<Type Name="commerce_qty_break">
<Column Name="pf_id" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
<Column Name="sku" Type="System.String" DbType="VarChar(100) NOT NULL" CanBeNull="false" />
<Column Name="qty" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
<Column Name="list_price" Type="System.Int32" DbType="Int NOT NULL" CanBeNull="false" />
<Column Name="sale_price" Type="System.Int32" DbType="Int" CanBeNull="true" />
<Column Name="sale_start" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" />
<Column Name="sale_end" Type="System.DateTime" DbType="DateTime" CanBeNull="true" />
<Column Name="break_id" Type="System.Int32" DbType="Int NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
<Association Name="commerce_product_commerce_qty_break" Member="commerce_product" ThisKey="pf_id" OtherKey="pf_id" Type="commerce_product" IsForeignKey="true" />
</Type>
</Table>
</Database>
EDIT 3: Apparently this is only an issue in SQL 2000. SQL 2008 works fine. I have other tables that do eager loading in SQL 2000 and i can't figure out what the difference is between these two tables.
I created a VB console app and created the schema as you have it here.
Also - the relationship is PK -> PK so does this mean it's supposed to be a one-to-one relationship?
I populated the tables with a row each (see below) and ran the code you've listed above. I ran SQL Profiler and it only queried once:
SELECT [t0].[pf_id], [t0].[name], [t0].[description], [t0].[restricted],
[t1].[pf_id] AS [pf_id2], [t1].[sku], [t1].[qty], [t1].[list_price],
[t1].[break_id], (
SELECT COUNT(*)
FROM [dbo].[commerce_qty_break] AS [t2]
WHERE [t2].[pf_id] = [t0].[pf_id]
) AS [value]
FROM [dbo].[commerce_product] AS [t0]
LEFT OUTER JOIN [dbo].[commerce_qty_break] AS [t1] ON [t1].[pf_id] = [t0].[pf_id]
ORDER BY [t0].[pf_id], [t1].[qty], [t1].[break_id]
I wanted to make sure that the Data Options was forcing a deep load, so I added some extra code - here's the full code I used (and only the single query as above was traced):
Dim options As New DataLoadOptions()
options.LoadWith(Function(c As commerce_product) c.commerce_qty_breaks)
db.LoadOptions = options
Dim dbProducts = (From prods In db.commerce_products).ToList
Dim dbProduct = dbProducts.First().commerce_qty_breaks
Dim x = dbProduct.First().list_price
Here's the test data:
INSERT INTO [Test].[dbo].[commerce_product] ([pf_id],[name],[description],[restricted]) VALUES (1,'Test','Test','Test')
GO
INSERT INTO [Test].[dbo].[commerce_qty_break] ([pf_id],[sku],[qty],[list_price],[break_id]) VALUES (1,'22',1,1,1)
GO
hey, not sure i completely understood your question, but here's some info,
By default LINQ to SQL adopts lazy binding, meaning it won't query the database until it needs to. That's why you're getting multiple queries.
There are few things you can do to avoid multiple hits on the DB:
You can turn off lazy binding globally in the LINQ to SQL designer. But then you'll always perform JOINS if your tables have any relationships.
You do the JOIN manually in the LINQ query. If you do this, you'll have to specify which "fields" you want to return in your LINQ query to get back the JOINED data. And if you do this, then you'll be returning an Anonymous type
NOTE: LINQ to SQL doesn't support LEFT JOINS. If you google LINQ to SQL Left Joins you'll see plenty of info on this particular subject
cheers, and good luck!
Go grab LINQPad. It's great for playing with stuff like this.
Did you try something like this?
Dim dbproducts = From prods In db.commerce_products _
Join qtys In db.commerce_qty_breaks On prods.pf_id Equals qtys.pf_id _
Select new {prods, qtys}
I ended up using the entity framework and all is well.

Resources