I have been reading about Command Query Responsibility Segregation (CQRS). I sort of wonder how would this work with ASP.NET MVC? I get the idea of CQRS conceptually it sounds nice and sure does introduce some complexities (event and messaging pattern) compared to the "normal/common" approach . Also the idea of CQRS sort of against the u...
Hello,
I m looking to separate the database code from the rest of the code in our application and looking to use an ORM framework that will work well for that knowing that the database is not well designed. I looked in other topics and found that most people suggest DBIx:class, Rose:DB:Object... but did not know which one will work best ...
I have a hibernate.cfg.xml with the JDBC Url configured thus:
<property name="hibernate.connection.url">jdbc:mysql://${server.hostname}:3306/dsm?zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=true&autoReconnect=true</property>
Those & are required (instead of just &) in order to avoid the exception: The reference t...
As my understanding on setting hibernate, I need to create
table meta data file (person.hbm.xml), include all the fields mapping
java object (person.java)
If we use stored procedures for all transaction, do we still need the above configuration?
It seems hibernate and stored procedures will overlap,
We set up the stored procedur...
Hi all,
I've a Color Enum
public enum color { GREEN, WHITE, RED }
and I have MyEntity that contains it.
public class MyEntity {
private Set<Color> colors;
...
I already have a UserType to map my Enums.
Do you know how to map a Set of Enums in the Hibernate hbm.xml?
Do I need a UserType or there's an easiest way? Thanks
ed...
We have some columns with data that must always be in uppercase to ensure uniqueness. I was wondering if hibernate can force all such columns to uppercase via some configuration file change?
We actually use a custom UserType for encrypting/decrypting column data for some other table, but I figured that would be overkill just to upperca...
below is how i do query cache
getHibernateTemplate().setCacheQueries(true);
List<IssSection> result = (List<IssSection>) getHibernateTemplate().findByCriteria(crit);
getHibernateTemplate().setCacheQueries(false);
may i know how to specify duration of maximum time to cache this method? let say i want to clear cache after 5 min...
So the ultimate in scope-creep came in the other day: since we're using Hibernate, could we make our webapp run on Oracle as well as MySQL, interchangably?
I thought this would be a simple case of changing hibernate.cfg.xml so that instead of explicity stating MySQL-specific options, it would reference a JNDI datasource, allowing the ap...
Like doctrine(active record) and Xyster(data mapper),what's the difference?
...
We are modifying our post on stackoverflow.
And we only changed the tags part,removed tag1,tag2 and added tag3,tag4.
After pressing the Post Your Question button,these things should be done:
reduced the count column for tag1,tag2 by 1
delete the relation between the post and tag1,tag2
if tag3,tag4 already exists,increase the count co...
I have a structure where the main table is USER, other tables include CATEGORY (contains user_id).
What I got after the standard reverse engineering procedure was:
the class User contained a collection of categories,
the class Category didn't contain the foreign key (user_id) but it did contain the User object.
Why did it not cont...
Any Good Websites/Blogs/Books that i can have a look at for learning nhibernate...
I have looked at NHibernate for .NET from Hibernate Core site.... Any other good ones....
...
We are using hibernate, postgres 8.3x
Our entities are many to one mapped with eager fetching.
We have multiple associations with Many to one mapping.
As we added new columns to any other existing entities,
We are getting below error:
target lists can have at most 1664 entries
I searched internet and they say this is due to
More num...
I am trying to map same column to be an attribute and a relationship (for reasons that have to do with legacy data) using following mapping:
References(x => x.BaseProductTemplate, "ProductCodeTxt");
Map(x => x.DescriptionCode, "ProductCodeTxt")
.CustomType(typeof(TrimmedStringUserType));
but "System.IndexOutOfRangeEx...
We have this hibernate.cfg.xml file. Is there a way to tell Hibernate to just scan a directory instead of having to add an entry here for each class?
<hibernate-configuration>
<session-factory>
<mapping class="com.abc.domain.model.A" />
<mapping class="com.abc.domain.model.B" />
<mapping class="com.abc.domain.model...
I am using the latest version of DBUnit (2.4.7), on Oracle 11GR2. I'm using Java 6 (1.6.0_15) and the latest version of Oracle's client jar (jdbc6.jar)
I've been unable to successfully load any data referenced by a CLOB Oracle field from an XML file into the database.
I've used all sorts of combinations of versions of the:
Oracle JDB...
Hi!
I'm having a problem with fluent-nhibernate and criteria.
I have the following setup.
class AMap : ClassMap<A>
{
Id(x => x.Id);
...
HasMany<Connection>(x => x.Connection).Inverse().ReadOnly();
}
class BMap : ClassMap<B>
{
Id(x => x.Id);
...
HasMany<Connection>(x => x.Connection).Inverse().ReadOnly();
}
class CM...
We have 2 different server environments using the same Hibernate configuration. One server has JNDI support for datasource, but the other does not. Currently the Hibernate configuration is configured to use JNDI, which is causing problem on the server that does not support JNDI.
I have also tried to put the direct JDBC configuration tog...
I have a table as follows
Table item {
ID - Primary Key
content - String
published_date - When the content was published
create_date - When this database entry was created
}
Every hour (or specified time interval) I run a process to update this table with data from different sources (websites). I want to display the results accordi...
I have recently heard "fanboys" of different .NET ORM methodologies express strong, if not outlandish oppinions of other ORM methodologies. And frankly feel a bit in the dark.
Could you please explain the key merits of each of these .NET ORM solutions?
Entity Framework
NHibernate
Subsonic
ADO.NET Datasets
I have a good understandi...