SCM

[#1010775] interval to timespan mapping fault

View Trackers | Bugs | Download .csv | Monitor

Date:
2010-03-09 17:12
Priority:
3
State:
Open
Submitted by:
Fernando Vicens (ferviri)
Assigned to:
Nobody (None)
Npgsql Version:
2.0.8
Category:
Group:
Resolution:
None
Summary:
interval to timespan mapping fault

Detailed description
Por: Fernando Vicens
Help with "interval" in a edmx file [ responder ]
2010-03-09 00:59
Hello,

When I use int4 in a property inside a edmx (manual editing) I dont have problems and I can connect to my postgres with a ADO Entity Service without problems, but when I try to use interval data type, Visual Studio throw me the next Exception (sorry it is in Spanish) "Error 40: El tipo interval no está calificado con un espacio de nombres o alias. Sólo PrimitiveTypes se pueden usar sin calificación".

What is wrong in my project?

I am using the las library Npgsql2.0.8-bin-ms.net3.5sp1.zip, i installed the dll with gacutil:
- npgsql.dll
- mono.security.dll
- policy.2.0.npgsql.dll

and put the needed reference in machine.config:
<DbProviderFactories>
<add name="Npgsql Data Provider" invariant="Npgsql" description=".Net Framework Data Provider for PostgreSQL" type="Npgsql.NpgsqlFactory, Npgsql, Version=2.0.8.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7"/>

And the connectionstring in my web.config:

<add name="Model1Container" connectionString="metadata=res://*/model1.csdl|res://*/model1.ssdl|res://*/model1.msl;provider=Npgsql;provider connection string=&quot;Port=5432;Encoding=UNICODE;Server=localhost;Database=prueba;UserId=postgres;Password=1234&quot;" providerName="System.Data.EntityClient" />

and my SSDL inside de edmx is:

<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx";;>
<!-- EF Runtime content -->
<edmx:Runtime>
<!-- SSDL content -->
<edmx:StorageModels>
<Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm/ssdl";; Namespace="Model1.Target" Alias="Self" Provider="Npgsql" ProviderManifestToken="2.0.8.0">
<EntityContainer Name="Model1TargetContainer" >
<EntitySet Name="Entidad1" EntityType="Model1.Target.Entidad1" />
</EntityContainer>
<EntityType Name="Entidad1">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="int4" Nullable="false" />
<Property Name="Nombre" Nullable="true" Type="interval" />
</EntityType>
</Schema>
</edmx:StorageModels>
<!-- CSDL content -->
<edmx:ConceptualModels>
<Schema xmlns="http://schemas.microsoft.com/ado/2006/04/edm";; Namespace="Model1" Alias="Self">
<EntityContainer Name="Model1Container" >
<EntitySet Name="Entidad1" EntityType="Model1.Entidad1" /></EntityContainer>
<EntityType Name="Entidad1">
<Key>
<PropertyRef Name="Id" /></Key>
<Property Name="Id" Type="Int32" Nullable="false" />
<Property Name="Nombre" Type="Time" Nullable="true" /></EntityType></Schema>
</edmx:ConceptualModels>
<!-- C-S mapping content -->
<edmx:Mappings>
<Mapping xmlns="urn:schemas-microsoft-com:windows:storage:mapping:CS" Space="C-S">
<Alias Key="Model" Value="Model1" />
<Alias Key="Target" Value="Model1.Target" />
<EntityContainerMapping CdmEntityContainer="Model1Container" StorageEntityContainer="Model1TargetContainer">
<EntitySetMapping Name="Entidad1" StoreEntitySet="Entidad1">
<EntityTypeMapping TypeName="Model1.Entidad1">
<MappingFragment StoreEntitySet="Entidad1">
<ScalarProperty ColumnName="Id" Name="Id"/>
<ScalarProperty ColumnName="Nombre" Name="Nombre"/>
</MappingFragment>
</EntityTypeMapping>
</EntitySetMapping>
</EntityContainerMapping>
</Mapping>
</edmx:Mappings>
</edmx:Runtime>


Best regards...

Followup

Message
Date: 2010-06-25 19:35
Sender: Josh Cooley

We now have a mapping from interval to TimeSpan in CVS. It should be part of the next release.

Attached Files:

Changes:

No Changes Have Been Made to This Item

Powered By FusionForge