We've had quite a bit of discussion among our development group concerning whether the composition of entities should drive the database design, or should the database design drive the composition of the entities.
For those who have dealt with this, what has been your philosophy? Of course, not every entity maps 1:1 to a database table....
Hi,
I have a tree structure in the DB with TreeNodes table. the table has nodeId, parentId and parameterId. in the EF, The structure is like TreeNode.Children where each child is a TreeNode...
I also have a Tree table with contain id,name and rootNodeId.
At the end of the day I would like to load the tree into a TreeView but I can't fi...
This is the setup for my 2 entities:
public class Person {
public Guid Id {get;set;}
public string Name {get;set;}
}
public class Immortal : Person {
public string DarkName {get;set;}
}
Here's what their mapping looks like:
<class name="Person">
<id name="Id">
<generator class="guid.comb"/>
</id>
<property name="Name...
Issue description:
I need to fix an issue with resolving of standard HTML entitities.
I've implemented HtmlEntityReader - implementation of XmlReader which has a code to resolve entities
Public API of our system provides a methods with usage of XmlReader, so user can pass XmlReader created using one of the XmlReader.Create methods
...
I've found the outlined versions, but I want the solid ones.
Does anyone know these entities?
Thanks
...
According to this section of the Hibernate documentation I should be able to query any java class in HQL
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html#queryhql-polymorphism
Unfortunately when I run this query...
"from Transaction trans where trans.envelopeId=:envelopeId"
I get the message "Transaction is n...
I would like to implement a Hierarchy Type Inheritance ... i.e. Cars to BMWs ... Cars would have CarTypeID that is associated with CarTypes. I would like CarTypeID to be the discriminator column. Unfortunately, I cannot do this in ADO.NET Entity Framework.
If I would like to keep the association, how am I able to achieve this?
Has an...
I wanna design an Entity Class which has a String[] property. This String Array always has two values and I dont want Hibernate (or rather JPA) create an extra table for this but embed this two String values directly into the table.
Is this possible and if so how?
...
In our legacy JEE application, there are loads of value object (VO) classes which typically contain only getters and setters, maybe equals() and hashCode(). These are (typically) the entities to be saved in persistence storage. (For the record, our app has no EJBs - although that might change in the future -, and we use Hibernate for pe...
Is it possible to determine the native table name of an entity?
If Table annotation is present it's easy:
entityClass.getAnnotation(Table.class).name()
But is it possible to get the table name, if no Table annotation is present?
Hibernate provides the information via Configuration https://www.hibernate.org/hib_docs/v3/api/org/hibern...
Hi, i'm using the method elementat for get a specific element of a query's result.
var mds = db.TDP_MissioniDestinazioni.Where(p => p.MissioneID == missioneRow.MissioneID);
destinazioneRow = mds.ElementAt(i);
LINQ to Entities does not recognize the method 'TimeEntModel.TDP_MissioniDestinazioni ElementAt[TDP_MissioniDestinazioni](S...
Can I generate entity framework model by clicking button in browser in client-side and save it back to web server PC?
...
i have function
public Menu Details(int? id)
{
return _dataContext.Menu.Include("ChildMenu").FirstOrDefault(m => m.MenuId == id);
}
now i need to add condition to child list ChildMenu something like fieldname=id. how can i do it?
...
I do this to save new invoince in my Invoices database table:
// insert invoice into EDM
edmx.AddToInvoices(newinvoice);
// save EDM changes to datastore
edmx.SaveChanges();
I have a trigger on one of the columns that gets computed dynamically by the database. What is the...
in my database a have an invoice table and a payment table.
i have a transactions view that shows payments and invoices.
i created an entity from that transaction view.
in my application i want to be able to add a payment from the transaction screen (which is a datagrid of transaction entities) and that the list of transactions be updat...
I'm binding this Entity framework query to a gridview and is ultra slow. The delay is on databinding. Any solution?
Using ctx As New DBEntities()
Dim PROC= (From p In context.Table.Include("RELATION") _
Where p.KEY= 1 _
Select p).First()
Dim q1 = From r In PROC.relation _
Select New With ...
I could use some really good links that explain Generics and how to use them. But I also have a very specific question, relater to working on a current project.
Given this class constructor:
public class SecuredDomainViewModel<TDomainContext, TEntity> : DomainViewModel<TDomainContext, TEntity>
where TDomainContext : Doma...
I have a textarea within an HTML page into which my users paste content.
There is often an "" (–)(\x2013) embedded in that content. I need to detect and replace it and store it in a database as –.
My code document.getElementById("input").value.replace("-", "–"); only detects the "-" (minus sign)(\x2D).
What would be...
Hello,
I have entity model like this (using EclipseLink and JPA 2.0):
@Entity
class A {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Long id;
//equals, hashCode autogenerated by nb.
}
And:
@Entity
class B {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)...
I'm parsing the the following...
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tox:message SYSTEM "http://tox.sf.net/tox/dtd/tox.dtd">
<tox:message xmlns:tox="http://tox.sourceforge.net/">
<tox:model owner="scott" package="queue" function="appendFact">
<tox:parameter value=" By John Smith – Thu Feb 25, 4:54 pm ET<br...