hibernate-annotations Questions
2
Solved
In a Many to Many relation between two table with a Mapping table in between, how can I only load ids for the second entity.
Following is the example to explain what I want to achieve here.
Below ...
Muhammadan asked 8/6, 2013 at 13:30
2
I have 2 entities with @Where annotation. First one is Category;
@Where(clause = "DELETED = '0'")
public class Category extends AbstractEntity
and it has the following relation;
@OneToMany(fetc...
Knitwear asked 20/3, 2016 at 20:32
3
Solved
I found in some old code strange thing (at least for me).
The field which is annotated @ManyToOne is also annotated with @BatchSize.
I always thought that @BatchSize annotation only affects when...
Convocation asked 24/10, 2012 at 11:36
4
Solved
I have the tables as in the screenshot above
Class are written as below
@Entity
public class Object {
@Id
private int id;
private String name;
@OneToMany(mappedBy="object",fetch=Fe...
Donatist asked 5/6, 2014 at 5:53
4
Solved
What is difference between @UniqueConstraint and @Column(unique = true)?
For example:
@Table(
name = "product_serial_group_mask",
uniqueConstraints = {@UniqueConstraint(columnNames = {"mask", ...
Anadromous asked 12/3, 2013 at 21:36
1
Solved
I would like to sort a OneToMany field with the @OrderBy annotation with multiple columns and specify the sort order for each but I can't seem to find the info anywhere on whether how to or if it's...
Searcy asked 7/2, 2017 at 9:4
6
I'm using Hibernate Annotations.
In all my model classes I annotate like this:
@Entity
@Table
public class SomeModelClass {
//
}
My hibernate.cfg.xml is
<hibernate-configuration>
<se...
Eardrop asked 11/9, 2009 at 20:47
4
Solved
I'm trying to configure org.apache.commons.dbcp.BasicDataSource as bean in web.xml under a tomcat project using tomcat 6 and postgresql
9.1
my servletdispacher.xml
`
<bean id="view...
Delphadelphi asked 17/1, 2014 at 16:58
5
Solved
I have made a class with name of Movie with folowing fields:
@Id
@GeneratedValue
private Long id;
private String name;
@ElementCollection(targetClass = String.class)
private Map<String, String...
Thaxton asked 1/12, 2010 at 13:32
3
How do I generate hibernate domain classes from tables with annotations at field level? I used Hibernate Tools project and generated domain classes from the tables in the database. The generated cl...
Opah asked 7/12, 2009 at 18:7
3
Solved
I have a compound Primary Key (IDHOLIDAYPACKAGE, IDHOLIDAYPACKAGEVARIANT) in table HolidayPackageVariant where IDHOLIDAYPACKAGE refers to entity HolidayPackage with a Many to One relationship betwe...
Veach asked 29/3, 2012 at 10:31
4
Solved
I had two hibernate entity here with annotation:
@Entity
@Table(name = "CLIENT")
public class Client {
private Long pkClient;
private String name;
@Id
@GeneratedValue(strategy=GenerationType...
Gosney asked 28/3, 2013 at 8:30
3
Solved
I am dealing with hibernate and as I opened my current project I figured out my Session-Factory is deprecated:
AnnotationConfiguration af = new AnnotationConfiguration();
SessionFactory factory = ...
Calan asked 28/7, 2013 at 18:17
2
Solved
How would one go about setting up the following in Spring using only Java and annotations.
<property name="hibernate.hbm2ddl.auto" value="update"/>
I amIt should be possible and I do belie...
Rento asked 1/10, 2015 at 22:11
3
Solved
In my entities I have some hibernate annotations for validation, like @NotEmpty, @Pattern.. and others
In my controller, on save action, it has an @Valid parameter.
But if any entity has any requ...
Hookup asked 6/12, 2012 at 14:36
1
Solved
I'm new to this hibernate annotation. I want to convert this xml mapping into annotations:
<map name="Text" table="JAV_TEXT" inverse="true" cascade="all-delete-orphan">
<key column="FK_G...
Sublime asked 31/7, 2015 at 6:50
4
Solved
I have a serious problem with hibernate. I followed various books und online tutorials, but I ever get the same Exception "ExceptionInInitializerError" obviously thrown by the HibernateUtil.java Li...
Alexandraalexandre asked 1/2, 2012 at 22:19
3
Solved
I am having trouble mapping my database domain model to the program entities in one case where the entity is essentially a join table (a period) which combines two other entities (a timeslot and a ...
Replacement asked 13/8, 2014 at 19:58
1
Solved
I'm using Hibernate 4.0 Final and ojdbc6 to develop my web application. Everything is ok except when I try to insert a new parent/child relationship. First of all, these are the entities:
@Entity
...
Equiprobable asked 11/3, 2013 at 7:2
1
Solved
I have the above tables i need to write the HIbernate entity class with annotation
and mapping
i have a problem while getting the List of ObjectAttributes..
Class are written as below
@Entity
...
Tick asked 4/6, 2014 at 17:45
2
Solved
I have a boolean property in my entity. Here's my annotations for it:
@Column(name = "IS_ACTIVE", nullable = false, columnDefinition="BIT DEFAULT 1", length = 1)
public Boolean getActive() {
retu...
Lattie asked 27/11, 2012 at 22:5
1
Solved
Been trying hard to search for a solution to create some Custom JPA Annotations to replace repetitive fields when declaring Entity POJOs. Any help? Here what I am trying to achieve:
//@Column(name...
Arlin asked 28/4, 2014 at 16:31
2
Solved
I want UserAcounts to be able to have many UserGroups.And All Groups can have many Users.And there is a join table.I want the releation between useraccount and usergroup in join table to be deleted...
Proportion asked 2/1, 2012 at 9:22
4
Solved
I have annotation-driven hibernate capabilies on my project.
Now I want to create an index over a column. My current column definition is
@NotNull
@Column(name = "hash")
private String hash;
an...
Excoriate asked 20/8, 2010 at 17:23
0
If I have only GeneratedValue in super class and if I have a specific generator type in subclass, how can i override this feature.
SUPER CLASS :
@Id
@GeneratedValue
private Long id;
SUB CLASS:...
Anamorphoscope asked 19/11, 2013 at 14:11
© 2022 - 2024 — McMap. All rights reserved.