entity

Is it possible to include a DOCTYPE declaration in an XML file and have the parser remove it while working?

Or perhaps have the parser just ignore the DOCTYPE tag in some fashion? I have XML files being used as "!ENTITY"s that also themselves need to have "!ENTITY"s and I have included the nested ones in the top-level file, but Visual Studio calls out my references to those in the 2nd-level files as not defined. Thanks! ...

JPA map relation entity parentID...

Hello, could someone help me to understand how can I define an entity with JPA mapping that has a relation with it self? For example, my entity is CompanyDivision, divisionA contains divisionB, divisionC and divisionB contains divisionB1, divisionB2 divisionA divisionB divisionB1 divisionB2 d...

override delete function in entity framework

How can i make my own delete method to prevent that the data really gets deleted? i want to set a datetime field when it gets deleted insted of a normal delete. i read about overriding the submitchanges function, but i don't get it to work thanks ...

Array of Objects in Core Data Entity?

I've got two entities, one named exercise and the other named workout. I would like to store several different exercises in each workout object. What is the correct logic here? Create an array of exercises in each workout? ...

nHibernate mapping for entity to multiple different parent entities (eg Addres -> Firm, Addres -> Client)

Can someone help me with the best way to map the following situation in fluent nHibernate? The Address class is used in both Client and Company. How can I store it most efficient in SQL? And what should the mapping look like? I've thought about multiple options, but I'm not experienced enough with nHibernate for these situations: use 1...

Entity Framework - Using a lookup (picklist) table with a lookup key

I'm working on a WPF application that is working well using the Entity Framework (3.5 SP1) for complicated table structures. The problem now is I want to get a list from the EF that includes lookups into a picklist table that has multiple picklists in it. In SQL I would write a sub select as such: SELECT Name, (Select typeName from P...

Creating base class for Entities in Entity Framework

I would like to create a base class that is somewhat generic for all of my entities. The class would have methods like Save(), Delete(), GetByID() and some other basic functionality and properties. I have more experience with Linq to SQL and was hoping to get some good examples for something similar in the EF. Thank you. ...

XML allows for external entities; what about XHTML?

This question about web page 'inclusion' triggered my curiosity. The XML allows you to specify a reference to an 'external' portion. Can you do the same in XHTML, then? XML example: <!ENTITY foo SYSTEM "http://www.mydomain.com/logo.gif" NDATA GIF87A> ... <SOMETHING>&foo;</SOMETHING> ...

Entity Framework: add property that don't map to database

Is it possible to add a property to an entity where the property is not supposed to map to the database? ...

MVVM: ado.net entity framework and model

Hi, I'm writing an application in wpf that uses MVVM. I wondered if I could use ado.net entity data model as a model in MVVM? Is it the same? If not, why? Thanks for any help. Regards, Ev. ...

How do I specify a multi-column id in orm xml for a JPA entity?

I'm trying to create a JPA Entity backed by a view which does not have an id. The rows are uniquely defined by two columns, product id and node id. How can I specify that the id for the entity is a multi-column id, and do it using xml, not annotations? ...

What is an Entity? Why is it called Entity?

What is the deal with Entities (when talking about the Entity Framework)? From what I understand, it is pretty much an in memory representation of a data store like sql tables. Entities are smart enough to track changes and apply those changes to the data store. Is there anything more to it? Thanks in advance. ...

Can I create many tables according to the same entity?

What I want to do is that I want to make the many tables dinamically which are the same entity structures. And then I want to refer to the dinamically created tables according to the table name. What I understood from hibernate reference is that I can only create only one table and it should be matched exactly with entity. So I can't fin...

XUL: how to render special html entities(copy, trade, deg...)?

If I just put in label value or anywhere else &trade; or &deg; it will give me parse error. ...

html entity is not rendered

If I just put in XUL file <label value="&#176;C"/> it works fine. However, I need to assing &#176; value to that label element and it doesn't show degree symbol, instead literal value. UPD sorry guys, I just missed couple words here - it doesn't work from within javascript - if I assign mylablel.value = degree + "&#176;" - this wil...

Views does not import to Entity Framework

Hi, I have a few views in my database that im using in my ASP MVC-application. Now I am experiencing a very strange problem. There are 8 views in the database but even if I check them all in the Create Enity Data Model-guide only 7 of them are available as objects in the datacontext. If I try to import ONLY the view that gets left out ...

Disable caching in JPA (eclipselink)

Hi, I want to use JPA (eclipselink) to get data from my database. The database is changed by a number of other sources and I therefore want to go back to the database for every find I execute. I have read a number of posts on disabling the cache but this does not seem to be working. Any ideas? I am trying to execute the following code:...

Storing a jpa entity where only the timestamp changes results in updates rather than inserts (desired).

I have a JPA entity that stores a fk id, a boolean and a timestamp: @Entity public class ChannelInUse implements Serializable { @Id @GeneratedValue private Long id; @ManyToOne @JoinColumn(nullable = false) private Channel channel; private boolean inUse = false; @Temporal(TemporalType.TIMESTAMP) private Date inUseAt = n...

Entity framework unit testing with sqlite

Is it possible to unit test Entity Framework v2 repositories with SqLite? Is this only possible if my entities are plain Poco and not automatically generated by Entity Framework? I've generated a entity model from SqlServer and in the generated .edmx file i found this in section SSDL content: Provider="System.Data.SqlClient". Correct me...

ThreadPool & Object lifetime

Hi, In an asp.net web application, there is a thread pool which is used to call a method. This method, uses an instance of EF ObjectContext to perform its operation. I am using Unity Framework which resolves an ObjectContext using the per-thread-lifetime manager. Does this guarantee that at the end of the method operation, the thread...