entity

How-to XHTML 1.1 validate an ampersand without escaping it?

My issue is the following. I have a XHTML 1.1 page that has a form and input fields. One of the input fields contains a value which is an URI. This URI contains key-value pairs with ampersand (&) as argument separator, that will be passed as a GET request by another web application in the browser. Usually I would use the entity & to...

Connecting to Oracle DB through NetBeans

Hi, I'm using NetBeans and I need to connect to Oracle Database. I set up the driver and the connection and it all works fine. I can run queries on this connection just fine (through the IDE). The problem is this- The tables I want to work with are not defined on the same schema that I use for the connection, although, my schema does ...

Update EntityManagerFactory cache?

Hi all, I got the following situation: In my project, I updated programmatically persistence unit. So, at first, the persistence.xml contains 1 entity class and then I created entity manager factory and everything worked like a charm. Bu then, I updated the persistence.xml file by adding more entity classes and re-invoke createEntityMan...

How should the addition of an aggregate root to a repository be expressed?

Let's say we have an aggregate root entity of type Order that relates customers and order lines. When I think about an order entity it's more natural to conceptualize it as not being defined without an Id. An order without an Id seems to be better represented as an order request than an order. To add an order to a repository, I usuall...

Why choosing JMS for asynchronous solution ? Why is it better than a simple entity bean ?

Hi everybody, In most projects I have participated, the choice of an asynchronous solution has been a source of much discussion ... Each time a single entity bean was enough to manage a queue: we just store a message (ticket) in a table and a processing cron unstacks the queue. This simple solution has the advantage of being very simpl...

Are there patterns for model / entity classes

What is the best approach to take when you are pulling model objects from multiple datasources? For example I have an application has has some data stored in a mySQL database using hibernate. What If I wanted to store some other objects in EC2 or Google App Engine? I understand that DAO's abstract the implementation of working with ...

RTF Trademark character (™)

I am trying to represent the trademark character in an RTF document. In HTML, I can use the entity ™, which generates the character . This does not work in RTF. I have also tried &#U153; but that does not work either. Any ideas on how to do this? ...

What is the need of a Custom Persistence Framework in Java?

We have a custom Persistence Framework wrapping the Entity Beans. I want to know why is this required or does it have any performance improvement when we already have Entity Beans (CMP) why the persistence framework is required. ...

NHibernate : Count childrens' children

I have an entity type A. Which has many B's. The B entity has many C's. I need to count how many C's does an A entity have. How can this be done using NHibernate Criteria API? Using LINQ to NHibernate I was unable to get results since it throws an exception (see this question) ...

Creating a relational structure

Scenario: I have some MAIN_TABLE1 MAIN_TABLE2 these main tables are in relational schema. Now, I need to move the data from this relational schema to some other flat tables: flat_Parent_Table flat_Child_Table1 flat_Child_Table2 flat_GrandChild1 flat_GrandChild2 Now one record from MAIN_...

Google Appengine: Is This a Good set of Entity Groups?

Hi, I am trying to wrap my head around Entity Groups in Google AppEngine. I understand them in general, but since it sounds like you can not change the relationships once the object is created AND I have a big data migration to do, I want to try to get it right the first time. I am making an Art site where members can sign up as regul...

Why are all public methods in an entity class declared as virtual when in use with NHibernate?

Why are the entity class methods declared as public virtual, when the class is to be mapped with a table using NHibernate. Is the answer that NHibernate will be able to override these methods at runtime? ...

Unable to access ID property from a datastore entity

Using Google App Engine SDK and Python, I'm facing an issue : I'm unable to access the ID property of a given entity properties. The only properties I can access are those defined in my class Model, plus the key property (see answer below) : class Question(db.Model): text = db.StringProperty() answers = db.StringListProperty() ...

Why do programming texts always use an "Employee" entity?

Is there something special about an Employee entity that makes it desirable to use it so frequently in programming texts? Are there any other entities that would serve just as well? ...

long vs Guid for the Id (Entity), what are the pros and cons

I am doing a web-application on asp.net mvc and I'm choosing between the long and Guid data type for my entities, but I don't know which one is better. Some say that long is much faster. Guid also might have some advantages. Anybody knows ? ...

New to Java Entities: Entity class complaining of being cast to itself

Hi, I'm fairly new to Java Entities, and I've got a bit of a strange problem casting from a Query.getSingleResult() call. Here's a code snippet: LoaPoliciesConfig policy = new LoaPoliciesConfig(); EntityManager em = getEntityManager(); try { Query q = em.createNamedQuery("LoaPoliciesConfig.findByName"); q.setParameter(...

HTML Entity for DASH

Putting two dashes on a page sometimes, like this -- in rare occassions messes the HTML up. For instance, if you enter -- into your Wordpress blog it'll actually munch it into a single -. This doesn't work well for code that requires --options --to --be --specified --this --way. The HTML entity for is &ndash and the longer is &mdash...

NHibernate's out of the box features.

How does NHibernate provide out of the box features as compared to the other OR/M tools available like ADO.NET entity framework and LINQ to SQL? ...

SubSonic, SimpleRepository and entity interfaces

Hi, Firstly, I want to apologize for my English, not my strongest side. To the question. In my current project, I have interfaces to my entities so I can use Subsonic attributes at my head entites and I want to be able to seamlessly switch O/R mapper in the future. Anyway, I get an error when I try to use my interfaces and SimpleReposit...

Entity, Value Object or what is it and where it should be?

I have class called 'Tool'. Tool has properties like: Name, Description and some specific others. Tool is special because Name and others are read only but description can be modified by users. Count of tools is constant and known at development time. It is not Value Object because I need to query them and show to users where they can u...