this is probably trivial, but i have a quite long sql query and echo Kohana::debug( $obj ); cuts off the tail of the query, replacing it with '...'.
how would i go about getting the full thing?
(something nicer than var_dump if possible ;-))
...
Hello i have this HQL request and i have an error when I run it
My function:
public ProprietaireInt getProprietaireInt(String codeImmeuble, String annee) {
//Create connexion
Session session = getHibernateTemplate().getSessionFactory().getCurrentSession();
ProprietaireInt proprietaireInt = new ProprietaireInt();
try{
...
Hello
last few hours I try to test with spring jpa 2.0 3.0
Finally I could recover objects persisted
but when I try to persist a new object I receive the following error message:
org.springframework.dao.InvalidDataAccessApiUsageException: no transaction is in progress; nested exception is javax.persistence.TransactionRequiredExceptio...
I have an application using Hibernate for data persistence, with Spring on top (for good measure). Until recently, there was one persistent class in the application, A:
@Entity
public class A {
@Id
@Column(unique = true, nullable = false, updatable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
...
Tags field not displaying as expected when using long tags.. did anyone try that out
...
My hibernate entities are as follows:
@Entity
@Table(name = "EditLocks")
public class EditLock extends AuditableEntity {
/** The document that is checked out. */
@OneToOne
@JoinColumn(name = "documentId", nullable = false)
private Document document;
Document then looks like this:
public class Document extends Audit...
I monkey-patched User model with the following two lines:
User._meta.get_field_by_name('email')[0]._unique = True
User._meta.get_field_by_name('email')[0].max_length = 125
-- and noticed, that models loaded after those two lines are executed, are not reachable from User.objects.filter(). For example, I have UserProfile model, ...
Are there any recommended approaches for implementing version control functionality accessible to end users of a business application?
The goal is to create a robust version control system for an application where users modify business objects (rather than text).
I'm not looking for recommendations on version control software for devel...
Here's my class hierarchy (lombok generated constructors/getters/setters ommitted for brevity):
public class A
{
... other variables ...
@OneToMany(fetch=FetchType.LAZY, cascade = {CascadeType.ALL})
private Set<B> bSet = new HashSet<B>();
}
public class B
{
... other variables ...
@CollectionOfElements
@IndexC...
Hi Folks (and Pascal),
I jave the following mapped superclass that provides a basic implementation for a parent/child self relationship to create a parent/child list for unlimited nesting of items (i.e. Categories)
@MappedSuperclass
public abstract class ParentChildPathEntity<N extends ParentChild> implements MaterializedPath<N> {
...
I have 2 libraries and one of them is a core library with some core persistent objects such as Person, Address, etc. I have another library which contains some different persistent objects that need to reference the core objects as well.
When I try to map them using Telerik Forward Mapping, I get a complaint that I am referencing a "No...
I'm trying to use Hibernate QBE (actually, Spring's HibernateTemplate.findByExample() ) to return a list of users by their username. I use a "known good" value to search on (the username "JOHN.SMITH" does exist in the database).
Unfortunately, I get no results back. Below is the unit test.
@Test
public void testQueryByExample() {
...
I want to map an entity from database, but I can't figure out how do this using NHibernate.
My entity "Module" have just three properties: id, name and a list of "Entities".
But my database table have the columns: id, cd_entity, cd_label.
So this is my problem. How can I map the property cd_label (that need join another table TB_LABE...
Select all works like this:
q = session.query(products)
Now I want to add a WHERE filter, so I am trying:
q = session.query(products).filter_by(stock_count=0)
I get an error saying 'nonetype' object has no attribute 'class_manager'.
Not sure what the issue is?
Update
The column seems to be mapped fine, as when I do:
q = session....
Hibernate Gurus,
I have a pesky issue and I don't really know how to solve my problem. I have a solution, however, I feel I may be reinventing the wheel.
I have two entities, The first is a User Object, The second is an Alias Object. The relationship between the two is that A USER can have multiple ALIAS(es) and an ALIAS can be tied to...
I'm trying to use Hibernate for the first time, and early on in the getting started guide, it makes reference to Maven. If I'm not mistaken, Maven appears to be a build tool. However, I've been using Eclipse to build my project up to this point.
Is there a way for me to use Hibernate without needing Maven? Can I just do what I need t...
I'm using hibernate annotations and i want to export my database schema.
Similar to the schemaexporttask with hbm xml files.
...
I am learning JPA and the general pattern in examples seems to be as follows:
EntityManager em = factory.createEntityManager();
em.getTransaction().begin();
// ....
em.getTransaction().commit();
em.close();
Now I am wondering why do we continually create and close EntityManagers, as opposed to keeping it open and just starting new tra...
Hi,
I've got a function with a session argument that does various HQL queries and HQL update statements in hibernate. They create sql that goes against alot of tables. All in one transaction.
Now what I want to do is add one entity that this function depends on, in another function, with session.save, and then call the first function...
There's an Entity Class "A". Class A might have children of the same type "A". Also "A" should hold it's parent if it is a child.
Is this possible? If so how should I map the relations in the Entity class?
["A" has an id column.]
...