Skip to main content
0 votes
1 answer
775 views

Ok, so I see that this the wrong approach: mysql> mysql> show tables; +---------------------+ | Tables_in_nntp | +---------------------+ | articles | | newsgroups | | ...
Thufir's user avatar
  • 8,575
2 votes
2 answers
6k views

This is very straight problem but I haven't figured out any solution yet. Scenario is I have 2 table in my DB. Source of 2nd table is dependent on 1st table's SOURCE_URL(can be more than 255 char so I ...
user avatar
1 vote
1 answer
2k views

I have a data model where I need a String column to be indexed by the backing database: @Entity public class A { // ... @Column(length=2048) @Index(name="strFieldIndex") private ...
Johan Sjöberg's user avatar
7 votes
2 answers
4k views

This is part of my model: @Entity public class Entry { @Id @GeneratedValue private long identifier; @ElementCollection @Column(nullable = false) private Map<String, String> ...
Panayiotis Karabassis's user avatar
5 votes
3 answers
18k views

The current column is a VARCHAR(255) NOT NULL, so how do I change it to TEXT NOT NULL? NOTE: The column intended to be changed its property type is a UNIQUE KEY combination of another column. E.g. ...
George Leow's user avatar
  • 2,373
2 votes
2 answers
8k views

I am trying to create an index on a particular text string using Hibernate annotations. What I am currently doing is: @Index(name="guid_index") @Column(length=1400) private String myGUID; However, ...
VeeArr's user avatar
  • 6,218
1 vote
2 answers
5k views

I am having trouble getting the right hibernate annotations to use on a Map with an enumerated class as a key. Here is a simplified (and extremely contrived) example. public class Thing { public ...
Jason Novak's user avatar
  • 1,091
0 votes
4 answers
1k views

How would I do the following (interested only in how to do UNIQUE (title, description)) in phpMyAdmin?: CREATE TABLE `myData` ( id serial primary key, title varchar(255) not null, ...
AleGore's user avatar
  • 303
534 votes
20 answers
645k views

I have a table with a primary key that is a varchar(255). Some cases have arisen where 255 characters isn't enough. I tried changing the field to a text, but I get the following error: BLOB/TEXT ...
GSto's user avatar
  • 42.5k
6 votes
1 answer
3k views

I'm trying to add a composite primary key to a class and having a bit of trouble. Here are the classes. class User { private long id; ... } class Token { private User user; private ...
user avatar
1 vote
1 answer
377 views

I am working to use django's ContentType framework to create some generic relations for a my models; after looking at how the django developers do it at django.contrib.comments.models I thought I ...
thornomad's user avatar
  • 6,807
0 votes
1 answer
5k views

I'm creating a table to hold items from rss feeds and I need to create a column 'description'. I selected the datatype as TEXT with no limit set with no index on this column. This is the error I'm ...
Kylee's user avatar
  • 1,675
2 votes
2 answers
4k views

I am trying to add a spatial index to a table column named Location of type BLOB. If I try this: ALTER TABLE route ADD SPATIAL INDEX(Location); I get: Error: BLOB/TEXT column 'Location' used ...
James Allen's user avatar
  • 7,317
7 votes
2 answers
4k views

I'm using MySQL fulltext indexes in a Rails 2.3.2 App. I added the index via native SQL in my migration. But there is a known issue causing problems with the schema.rb. Rails doesn't understand ...
Ole Spaarmann's user avatar